• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Redirect, but POST wanted.

 
Vishal Saxena
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
If I redirect to a URL, I achieve a GET. How to achieve a POST ?
 
Amol Desai
Ranch Hand
Posts: 82
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This link below could be useful to you.
http://www.coderanch.com/t/347293/Servlets/java/Do-Forward-Redirect-Extra-Parameters
-Amol
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a thought, but I'm not sure it will work.
One thing to try is to redirect to an intermediate page, and have the intermediate page do an 'auto-post' to the page you want.
The intermediate page would look like this:

Dave
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have seen this submit done in a Javascript "page complete" event. Anybody recall that actual event name? Is it necessary to put it there, or is it ok as shown in the post above? Let us know how this works out for you!
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65216
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have used the technique that David outlined above many times with great success.
hth,
bear
 
Dana Hanna
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only bad side to David's approach is that the back button won't let the user back through (unless they click it REAL fast).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic