Hello Ranchers, I want to collect the username & passcode of users in my jsp & after validating thru a webservice call I want to redirect to another url(third party url)sending the values entered by the user using a post method. Since by using get method the values will be appended in the url & can be seen by the outside world which I don't want to.
use POST method instead of GET,POST method is more secure.
Joined: Jun 01, 2006
use interface request dispatcher, it receives requests from the client and sends them to any resource (such as a servlet, HTML file, or JSP file) on the server. The servlet container creates the RequestDispatcher object, which is used as a wrapper around a server resource located at a particular path or given by a particular name,then use the method forward.
I dont think its possible to redirect using a RequestDispatcher. You could always forward or include however.
Redirect is essentially a browser action. The response, in its header, would contain a redirect code with the redirect url. The browser reads this header and does a 'GET' request to the url. As far as I know, its not possible to force the browser to issue a post request for a redirect.
subject: redirect to another url using the post method