• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Changing a POST request to a GET request

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Brahim Bakayoko
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic