Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Gowtham Mani
Changing the context of the portal
May 7, 2012 6:35 AM
Answer

Gowtham Mani

Rank: Junior Member

Posts: 56

Join Date: November 25, 2008

Recent Posts

Hi,

How to change the context root of the portal from / to a custom one say /domain/site

I tried using the portal.ctx property, but getting an indefinite loop when i try to load the page in the browser.

using liferay 6.1 bundeled with tomcat package.

Thanks
Gowtham
Priyanka Dhingra
RE: Changing the context of the portal
May 7, 2012 9:39 AM
Answer

Priyanka Dhingra

Rank: Expert

Posts: 411

Join Date: December 19, 2011

Recent Posts

Try opening it in the other browser, it should work
Hitoshi Ozawa
RE: Changing the context of the portal
May 7, 2012 8:50 PM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 8000

Join Date: March 23, 2010

Recent Posts

or clearing the web browser cache. :-)
Gowtham Mani
RE: Changing the context of the portal
May 7, 2012 11:15 PM
Answer

Gowtham Mani

Rank: Junior Member

Posts: 56

Join Date: November 25, 2008

Recent Posts

Clearing the cache didn't work-out and the other browser option also emoticon
Ravi Kumar Gupta
RE: Changing the context of the portal
May 7, 2012 11:23 PM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1041

Join Date: June 23, 2009

Recent Posts

Gowtham, Try this. Shutdown the server. Try opening this in browser, it should say not found/responding etc. Restart the browser, restart Liferay Server.
I guess you might have already tried changing the portal.ctx property and renaming the root folder.
Gowtham Mani
RE: Changing the context of the portal
May 7, 2012 11:40 PM
Answer

Gowtham Mani

Rank: Junior Member

Posts: 56

Join Date: November 25, 2008

Recent Posts

Ravi,

the one which is confusing me is how to rename the folder structure for the /domain/site context.

if its the case for /domain it would be just renaming the folder and the ROOT.xml file, but not sure what to do for the /domain/site
Ravi Kumar Gupta
RE: Changing the context of the portal
May 8, 2012 12:19 AM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1041

Join Date: June 23, 2009

Recent Posts

hmm.. tried several things nothing worked.. but there is one thing that can help. Using mod_proxy/http with apache on front to server portal as /domain/site
Gowtham Mani
RE: Changing the context of the portal
May 8, 2012 12:29 AM
Answer

Gowtham Mani

Rank: Junior Member

Posts: 56

Join Date: November 25, 2008

Recent Posts

ya with apache i can make this work, but wanted to know how to work with /domain/site context instead simple context as /domain
Ravi Kumar Gupta
RE: Changing the context of the portal
May 8, 2012 12:53 AM
Answer

Ravi Kumar Gupta

Rank: Liferay Legend

Posts: 1041

Join Date: June 23, 2009

Recent Posts

I am not sure Gowtham, whether that is possible. Hitoshi, any word about this kind of context path?
Hitoshi Ozawa
RE: Changing the context of the portal
May 8, 2012 5:38 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 8000

Join Date: March 23, 2010

Recent Posts

Have you deleted the temp directory under liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23
Gowtham Mani
RE: Changing the context of the portal
May 8, 2012 5:41 AM
Answer

Gowtham Mani

Rank: Junior Member

Posts: 56

Join Date: November 25, 2008

Recent Posts

Hi Hitoshi,

That is one of the first thing i did emoticon
Corné Aussems
RE: Changing the context of the portal
May 10, 2012 10:50 PM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1181

Join Date: October 3, 2006

Recent Posts

You could rename the ROOT webapp
Gowtham Mani
RE: Changing the context of the portal
May 10, 2012 11:28 PM
Answer

Gowtham Mani

Rank: Junior Member

Posts: 56

Join Date: November 25, 2008

Recent Posts

yes Corne, i have tried re-naming the root webapp but for the double context like /domain/site i dont know how to proceed with that
Corné Aussems
RE: Changing the context of the portal
May 11, 2012 12:09 AM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1181

Join Date: October 3, 2006

Recent Posts

Ha Gowtham,

My message was not complete, battery died, but somehow commited this reply emoticon
It is simply not possible in Tomcat to have a subdirectory in the context path only when using docpath and such;
Context

So you succeeded in a single context path right!?
Wiki

I know what you try to reach and i think that is impossible without some strange Tomcat hack like
1  <Context path="/portal/smth" docBase="webapps/portal" /> 


For others you could always change these too
1
2    layout.friendly.url.private.group.servlet.mapping=/group
3    layout.friendly.url.private.user.servlet.mapping=/user
4    layout.friendly.url.public.servlet.mapping=/web
Corné Aussems
RE: Changing the context of the portal
May 11, 2012 1:29 AM
Answer

Corné Aussems

Rank: Liferay Legend

Posts: 1181

Join Date: October 3, 2006

Recent Posts

mmm to no avail either.

WARNING: A docBase C:\LIFERAY_DEV\servers\liferay-portal-6.1.10-ee-ga1\tomcat-7.0.25\webapps\webapps\ROOT inside the host appBase has been specified, and will b
e ignored


But i found your solution
one should use a # for seperation
Rename ROOT to portal#test
rename root.xml ${Catalina-home}/conf/Catalina/localhost/portal#test.xml
change in context file
<Context path="/portal#test" crossContext="true" >

and of course add this to the properties
portal.ctx=/portal/test
Attachment

Attachments: Afbeelding 166.png (21.1k)
Gowtham Mani
RE: Changing the context of the portal
May 11, 2012 2:45 AM
Answer

Gowtham Mani

Rank: Junior Member

Posts: 56

Join Date: November 25, 2008

Recent Posts

Sorry for delayed response.
I tried the same steps but instead of renaming the folder to domain#site i created a sub directory named site emoticon

Thanks for the info.

Gowtham