Re: GET and POST data in same request
On 02/12/2010 22:21, Larry wrote: > Hello, > > I need to have an apache mod_rewrite pass a request ( which contains > POST data ) along to my servlet with some GET parameters. > > I think when Tomcat sees the GET params, it invokes my servlet's doGet > ( which annihilates my POST data ). > > I need to be able to access both the GET data from the request URL and > the POST data from the body. > > Is this possible? Maybe its not tomcat's fault ;) > > Any insight is welcome, thanks. The user agent needs to send this request using POST. Tomcat will merge parameters from the request body with those in the URL as per the rules in the Servlet spec. If the response body is being dropped then the user agent is either using GET or using POST and failing to set content type required for Tomcat to parse the request body. Again, this is defined in the Servlet spec. Mark - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: GET and POST data in same request
GET and POST are HTTP verbs/operations. It is impossible to have a combo GET/POST. Which ever verb is specified in the HTTP headers is what will control whether doGet or doPost is called. You are correct that GET and POST reference data differently, however they are actions and not "areas of data" in an HTTP request. Regards, Justin --Original Message-- From: Larry To: users ReplyTo: Tomcat Users List Subject: GET and POST data in same request Sent: Dec 2, 2010 17:21 Hello, I need to have an apache mod_rewrite pass a request ( which contains POST data ) along to my servlet with some GET parameters. I think when Tomcat sees the GET params, it invokes my servlet's doGet ( which annihilates my POST data ). I need to be able to access both the GET data from the request URL and the POST data from the body. Is this possible? Maybe its not tomcat's fault ;) Any insight is welcome, thanks. -Larry - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org Sent from my BlackBerry device