留言板
portalURL repalces my # sign with %23 (HEX of #)
A M,修改在12 年前。
portalURL repalces my # sign with %23 (HEX of #)
Junior Member 帖子: 66 加入日期: 11-9-8 最近的帖子
Hi Guys,
portalURL repalces my #sign with %23 (HEX of #) in URL which i don't want.
Any suggestions.
Thanks.
portalURL repalces my #sign with %23 (HEX of #) in URL which i don't want.
Any suggestions.
Thanks.
A M,修改在12 年前。
RE: portalURL repalces my # sign with %23 (HEX of #)
Junior Member 帖子: 66 加入日期: 11-9-8 最近的帖子liferay-portlet:renderURL varImpl="rowURL">
<portlet:param name="struts_action" value="/message_boards/view_message" />
<portlet:param name="messageId" value="<%= HtmlUtil.unescape(messageID)%>" />
where messageID contains a URL which has a # sign in it.
Help?
A M,修改在12 年前。
RE: portalURL repalces my # sign with %23 (HEX of #)
Junior Member 帖子: 66 加入日期: 11-9-8 最近的帖子
Please help guys..I am stuck.
Raja Nagendra Kumar,修改在12 年前。
RE: portalURL repalces my # sign with %23 (HEX of #)
Expert 帖子: 484 加入日期: 06-3-2 最近的帖子
Did you read this..
http://stackoverflow.com/questions/1454668/jsr168-portlet-request-cuts-param-value-after-symbol
http://stackoverflow.com/questions/1454668/jsr168-portlet-request-cuts-param-value-after-symbol
A M,修改在12 年前。
RE: portalURL repalces my # sign with %23 (HEX of #)
Junior Member 帖子: 66 加入日期: 11-9-8 最近的帖子
Dear Raja,
Thanks for your reply and link. It was useful but i have got a bit of different problem. Well i am using <liferay-portlet:renderURL> to render URL and with <portlet:param> i pass a parameter value. This parameter value also contains my anchor value( e.g ¶meter=valu#middleOfPage). Now when liferay render this url, it simply replaces my # with %23. so now my parameter value becomes ¶meter=valu%23middleOfPage. So thats why i am unable to achieve what i want.
The thing is i believe, liferay is automatically doing encoding of URL so its replace # sign with %23. I am very new to liferay so can you please guid me in right direction to solve this problem. I mean how can i get # sign in my URL, thats my goal right now.
Thanks for your reply and link. It was useful but i have got a bit of different problem. Well i am using <liferay-portlet:renderURL> to render URL and with <portlet:param> i pass a parameter value. This parameter value also contains my anchor value( e.g ¶meter=valu#middleOfPage). Now when liferay render this url, it simply replaces my # with %23. so now my parameter value becomes ¶meter=valu%23middleOfPage. So thats why i am unable to achieve what i want.
The thing is i believe, liferay is automatically doing encoding of URL so its replace # sign with %23. I am very new to liferay so can you please guid me in right direction to solve this problem. I mean how can i get # sign in my URL, thats my goal right now.
Hajri Mohamed,修改在12 年前。
RE: portalURL repalces my # sign with %23 (HEX of #)
Junior Member 帖子: 71 加入日期: 11-3-2 最近的帖子
try to place messageID directly, dont use HtmlUtil.unescape(messageID) because it will change the # caracter
regards
regards
A M,修改在12 年前。
RE: portalURL repalces my # sign with %23 (HEX of #) (答复)
Junior Member 帖子: 66 加入日期: 11-9-8 最近的帖子
Thank you everybody who replied. This line solved my problem.
HttpUtil.decodeURL(HtmlUtil.unescape(rowURL.toString()));
Thanks.
HttpUtil.decodeURL(HtmlUtil.unescape(rowURL.toString()));
Thanks.