how to redirect to html page from gsp page?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

how to redirect to html page from gsp page?

amal.shehadeh
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

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/fac8c5c8-6094-459b-95bd-880b421dbba6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: how to redirect to html page from gsp page?

amal.shehadeh
and how to hide the redirection url?

On Tuesday, January 2, 2018 at 2:53:16 PM UTC+1, Katy wrote:
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

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/c831a5f8-dc4d-4878-a224-744524b0f387%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: how to redirect to html page from gsp page?

Dem K
In reply to this post by amal.shehadeh
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

On Tuesday, 2 January 2018 06:53:16 UTC-7, Katy wrote:
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

--
You received this message because you are subscribed to the Google Groups "Grails Dev Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/grails-dev-discuss/8d652952-2eaa-427d-9aca-c7e3b9154d5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.