| | |
Redirect/forward form to another host
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Apr 2008
Posts: 2
Reputation:
Solved Threads: 0
Maybe a dumb question but is there a way to redirect/forward a form (and all it's parameters) to another host using jsp? Like this http://www.xxx.com/form.jsp -> http://www.xxx.com/redirect.jsp -> http://www.yyy.com/response.jsp
I've tried with sendRedirect which doesn't pass along the parameters and forward that for some reason doesn't seem to work with an external host.
Thanks,
tte
I've tried with sendRedirect which doesn't pass along the parameters and forward that for some reason doesn't seem to work with an external host.
Thanks,
tte
redirect works, forward won't work.
But of course the HTTP session does NOT get shared.
And quite possibly you'll need to make sure you're working with POST requests so and change the request parameters to request attributes.
Remember that nothing except what ends up in the http request gets send across.
But of course the HTTP session does NOT get shared.
And quite possibly you'll need to make sure you're working with POST requests so and change the request parameters to request attributes.
Remember that nothing except what ends up in the http request gets send across.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Forward won't work given that the requested servlet is looked for in the given ServletContext.
sendRedirect doesn't preserve the original request since it's a new request altogether which the client is making -- sendRedirect is basically an indication to the client to request for the given URI. I don't accept change; I don't deserve to live.
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
Jo Tujhe Jagaaye, Nindein Teri Udaaye Khwaab Hai Sachcha Wahi.
Nindon Mein Jo Aaye Jise To Bhul Jaaye Khawab Woh Sachcha Nahi.
Khwaab Ko Raag De, Nind Ko Aag De
![]() |
Other Threads in the JSP Forum
- Previous Thread: save textbox value in session variable
- Next Thread: Registration Problem using Jsp
Views: 1444 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for JSP
apache array backbutton combobox comma connection csv database development directorystructure dropdownlist dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 mysql netbeans network parameters passing ping printinserverinsteadofclient project read redirect request.getparameter response seperated servlet servletdopost()readxml sessions software sql ssl state_saving_method stocks sun tomcat tutorial update values video web write






