How can I make a POST request through response.sendRedirect() or response.setStatus() and response.setHeader() methods?

Alex Chaffee

You can't. It's a fundamental limitation of the HTTP protocol. You'll have to figure out some other way to pass the data, such as

  • Use GET instead
  • Make the POST from your servlet, not from the client
  • Store data in cookies instead of passing it via GET/POST
Search the FAQ for questions relating to the above.
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.