wood burning stoves 2.0*
The moose likes Servlets and the fly likes Changing a POST request to a GET request Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Changing a POST request to a GET request" Watch "Changing a POST request to a GET request" New topic
Author

Changing a POST request to a GET request

Brahim Bakayoko
Ranch Hand

Joined: Aug 29, 2003
Posts: 155
I am trying to change a POST request to a GET request before dispatching.

I have tried to pass the request and response objects to doGet() from doPost(), then use an HttpServletRequestWrapper and overriding the getMethod() implementation, but it does not help. The dispatcher always dispatcher a POST request.

I don't want to use a sendRedirect due to undesirable behaviors with my compression filter.
I might have to use URLConnection or an http client, which I really don't want to do.

Any idea?


SCJP, SCWCD, SCBCD, IBM CSD WebSphere v5, <br />A+, MCP 2000 and 2000 server, CST, and few incompleted certification tracks.<br /> <br />Ivory Coast<br /> <br />Analyze your web Request/Response @ <a href="http://webtools.servehttp.com" target="_blank" rel="nofollow">http://webtools.servehttp.com</a> down for a while...
Brahim Bakayoko
Ranch Hand

Joined: Aug 29, 2003
Posts: 155
Bah... resulted to using an http client.

Although the performance is really good, I am still looking for how to change a POST request to a GET request.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Changing a POST request to a GET request
 
Similar Threads
sendRedirect as POST
How to get an integer value from controller to jsp
request Attribute doubt?
Forwarding to a URL outside the container
Sending a request from a servlet