| | |
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.
![]() |
Other Threads in the JSP Forum
- Previous Thread: save textbox value in session variable
- Next Thread: Registration Problem using Jsp
| Thread Tools | Search this Thread |
apache backbutton combobox connection database development directorystructure dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 network parameters passing ping printinserverinsteadofclient redirect request.getparameter response servlet servletdopost()readxml sessions software ssl state_saving_method stocks sun tomcat tutorial update video web






