how to redirect to html page from gsp page?

364 views
Skip to first unread message

amal.s...@gmail.com

unread,
Jan 2, 2018, 8:53:16 AM1/2/18
to Grails Dev Discuss
Hi,

How can I redirect from index.gsp to index.html that exists in another folder? I used javascript to do the redirection (window.location) but the url is not loaded correctly! is there a better way to do it with gsp or an indication about the reason of the problem.

Thanks in advance

Katy

unread,
Jan 2, 2018, 9:55:58 AM1/2/18
to Grails Dev Discuss
and how to hide the redirection url?

Dem K

unread,
Jan 23, 2018, 1:21:52 PM1/23/18
to Grails Dev Discuss
Typically you would do the redirect in the Grails Controller

http://docs.grails.org/latest/guide/theWebLayer.html#redirectsAndChaining

If you have to do it in the gsp try using createlink to get the URL https://gsp.grails.org/latest/ref/Tags/createLink.html
Reply all
Reply to author
Forward
0 new messages