留言板

How to get the friendly url of my application in liferay 6.

Kiran Kumar Boyini,修改在11 年前。

How to get the friendly url of my application in liferay 6.

Expert 帖子: 287 加入日期: 11-6-2 最近的帖子
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.
thumbnail
Juhi Kumari,修改在11 年前。

RE: How to get the friendly url of my application in liferay 6.

Expert 帖子: 347 加入日期: 11-12-12 最近的帖子
Hi,
Use this
HttpServletRequest request = PortalUtil.getOriginalServletRequest(PortalUtil.getHttpServletRequest(renderRequest));
String url = 	PortalUtil.getHomeURL(request);


Regards
Juhi
Kiran Kumar Boyini,修改在11 年前。

RE: How to get the friendly url of my application in liferay 6.

Expert 帖子: 287 加入日期: 11-6-2 最近的帖子
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.
thumbnail
Juhi Kumari,修改在11 年前。

RE: How to get the friendly url of my application in liferay 6.

Expert 帖子: 347 加入日期: 11-12-12 最近的帖子
Hi,

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

only.

Regards
Juhi