cancel
Showing results for 
Search instead for 
Did you mean: 

Redirect from post to get

tfrith
Champ on-the-rise
Champ on-the-rise
Is it possible to have my xxx.post.js redirect (server-side) to xxx.get.js and maintain all the properties set using model.xxx ?

What I'm talking about is the same idea as a forward using a servlet.

I know you can redirect to custom status pages based on different codes, but doesn't that just jump directly to an .ftl and not execute corresponding .js?

Tim
3 REPLIES 3

mrogers
Star Contributor
Star Contributor
I would hazard a guess that no it's not possible.   You can do the redirect the other way (get to post) but how would you handle the body of the posting with a get method?

rogier_oudshoor
Champ in-the-making
Champ in-the-making
What are you trying to achieve by that? I'm quite sure there are some technical options available to you, but it depends on what you're trying to do here Smiley Wink

lyamamot
Champ in-the-making
Champ in-the-making
I've used the following code in the JS of a form submission processing script. It's not perfect but it generally works:

status.code = 303; // 303 = See Other
status.redirect = true;
status.location = "/path/to/other/script.html";