掲示板
How to get currentURL
I have copied a lot of Liferay source code, but I can't quite find the mechanism for using the variable 'currentURL'. Sometimes it's declared and accessible for redirects, sometimes it's not. I don't ever actually see a declaration or assignment to this variable, but I've seen it used many times. I must be missing it, I am fairly blind.
Right now I'm wishing to use it but can't seem to find out what to import or how to assign the current url to it.
Does anyone happen to know?
Thanks!
-Ed
Right now I'm wishing to use it but can't seem to find out what to import or how to assign the current url to it.
Does anyone happen to know?
Thanks!
-Ed
hey ed, its declared in init.jsp which is included in the jsps that use it.
joe
String currentURL = PortletURLUtil.getCurrent(renderRequest, renderResponse).toString();
joe
9年前 に Enrique Valdes Lacasa によって更新されました。
RE: How to get currentURL
Junior Member 投稿: 92 参加年月日: 14/07/29 最新の投稿
If you need to retrieve it in your JSP, you can easily use the themeDisplay object:
String currentURL = themeDisplay.getURLCurrent();