Hi gurus
I have problem with encode slash in url.
Problem:
from request in GSP page:
<a href="http://foo.cz/myapp/page/show?url=home/gallery">Gallery</a>
I got:
http://foo.cz/myapp/page/show?url=home%2Fgallery
in address row in Internet browser.
Problem is with encode character from "/" to "%2F".
Explanation:
this is link in my gsp file:
<a href="http://foo.cz/myapp/page/show?url=home/gallery">Gallery</a>
after click request goes to controller:
def show ={
def page = Page.findByUrl( params.url ) //it works
}
then I got gsp page in my Internet browser. All work fine, I got required page, but in adress row in Internet browser I saw:
http://foo.cz/myapp/page/show?url=home%2Fgallery
There is not character "/", but encode "%2F"
Motivation
I want to set the url in UrlMapping.groovy to:
"/${url}" (controller:"page", action:"show")
and get:
http://foo.cz/myapp/home/gallery/
but there are problem with encode character "/".
Finish
Can you help me please?
Thanks a lot Tom