Maxim,

try this:

  public void doPost(HttpServletRequest req, HttpServletResponse res)
                                throws ServletException, IOException {
    doGet(req, res);
  }

Hope this helps!

Uwe

-----Ursprungligt meddelande-----
Fran: A mailing list for discussion about Sun Microsystem's Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]For Maxim
Patramanskij
Skickat: den 12 februari 2002 11:37
Till: [EMAIL PROTECTED]
Amne: Forwarding from POST to GET


I've tried to forward POST request to the same servlet, but
transforming it to GET by adding some query string, but I've got the
looping and then crash of tomcat 3.3.

I realized, that it isn't possible to forward from POST to GET and
vice versa. I didn't found any mentioning about this problem in
Servlet API specification(both 2.2 and 2.3).


Max

-- Original message --
From: "Markus Kirsten" <[EMAIL PROTECTED]>
Date: Thursday, February 07, 2002, 11:35:44 PM
Subject: URL changing

MK> Hi Max,
MK> The way I would do it is to first get the parameters in your doPost()
MK> method, then create a RequestDispatcher that point to your preferred URL
MK> including the GET parameters encoded in the URL. After that just forward
MK> the request to a servlet (eventually the same) with rd.forward(URL).

MK> Hope this helps!


MK> Markus Kirsten

MK>
___________________________________________________________________________
MK> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
MK> of the message "signoff SERVLET-INTEREST".

MK> Archives: http://archives.java.sun.com/archives/servlet-interest.html
MK> Resources: http://java.sun.com/products/servlet/external-resources.html
MK> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to