Forums

Home » Alloy UI » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Kiran Kumar Boyini
How to get the friendly url of my application in liferay 6.
February 26, 2013 11:17 PM
Answer

Kiran Kumar Boyini

Rank: Expert

Posts: 277

Join Date: June 2, 2011

Recent Posts

Hi All,

I want to get the friendly url in action class .

ex: http://localhost:8081/web/guest/google-page.


from the above url,I want to get the this url : http://localhost:8081/web/guest



Regards,

Kiran.
Juhi Kumari
RE: How to get the friendly url of my application in liferay 6.
February 26, 2013 11:32 PM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi,
Use this
1HttpServletRequest request = PortalUtil.getOriginalServletRequest(PortalUtil.getHttpServletRequest(renderRequest));
2String url =     PortalUtil.getHomeURL(request);


Regards
Juhi
Kiran Kumar Boyini
RE: How to get the friendly url of my application in liferay 6.
February 27, 2013 2:37 AM
Answer

Kiran Kumar Boyini

Rank: Expert

Posts: 277

Join Date: June 2, 2011

Recent Posts

Thank you for reply....

But it is giving the following url

http://localhost:8081/web/guest/home

I want the following url :

http://localhost:8081/web/guest

Anyway I have done it by manipulating the http://localhost:8081/web/guest/home.

Regards,

Kiran.
Juhi Kumari
RE: How to get the friendly url of my application in liferay 6.
February 27, 2013 2:08 AM
Answer

Juhi Kumari

Rank: Expert

Posts: 347

Join Date: December 12, 2011

Recent Posts

Hi,

Check once again. Its returning url like
1http://localhost:8081/web/guest

only.

Regards
Juhi