| Author |
Request needs to be POST In servlet
|
Nalini Nagarathinam
Greenhorn
Joined: Jun 13, 2010
Posts: 16
|
|
I have a requirement that from the jsp, when they click on the link. I will call the servlet, in this i need to add a new parameters with the url and send it as the POST request.
The destination URL is a new domain. Could you please help me on how to send the request as POST method in servlet with the add new parameters.
|
Nalini Nagarathinam
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56224
|
|
In a POST the parameters should be passed in the request body, not on the URL. That's how parameters are passed on GETs.
So your requirements are rather screwy.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Nalini Nagarathinam
Greenhorn
Joined: Jun 13, 2010
Posts: 16
|
|
Thanks for your reply..
How to add the parameters in the request body and send it as the POST request?
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56224
|
|
To send it to another web application in another domain?
You could either use a tool such as HttpClient to create the request, or you could dynamically create a JSP form and cuase it to be posted with some JavaScript.
The former would be the more elegant and versatile approach.
|
 |
 |
|
|
subject: Request needs to be POST In servlet
|
|
|