You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Rosenberg <sh...@gmail.com> on 2011/04/02 22:31:25 UTC

PUT Data Available in App?

I've been experimenting with a REST service using Grails on Tomcat.  Some
experimentation & searching online leads to believe that Tomcat does not
normally pass PUT data through to app.

Is this correct?  I am using v7.

--
JR

RE: PUT Data Available in App?

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Jonathan Rosenberg [mailto:shmoldie@gmail.com] 
> Subject: PUT Data Available in App?

> Some experimentation & searching online leads to believe 
> that Tomcat does not normally pass PUT data through to app.

> Is this correct?  I am using v7.

No, it's not correct.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: PUT Data Available in App?

Posted by Jonathan Rosenberg <sh...@gmail.com>.
Probably so.  I was hoping Grails would populate params object as it does
for get & put.  I didn't see this happening & after some digging around
began to believe tomcat was the "problem". Apparently all works fine when
using jetty (I have nor confirmed this).

I need to see if Grails will let me get to raw request body.
On Apr 3, 2011 3:39 PM, "Konstantin Kolinko" <kn...@gmail.com> wrote:
> 2011/4/3 Jonathan Rosenberg <sh...@gmail.com>:
>> My question was sloppy.  I have a Grails app.  If I use POST it sees
data.
>> If I use PUT in same situation data does not show up in Grails App.
>>
>> Spying shows me data is sent.  I'm guessing tomcat handles put data
>> differently than post data.
>
> PUT data are different from POST data, exactly by definition. Tomcat
> does not do any special processing of them. (Though as Felix mentions,
> some processing can be turned on).
>
> Maybe these are wrong expectations on your side?
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

Re: PUT Data Available in App?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/4/3 Jonathan Rosenberg <sh...@gmail.com>:
> My question was sloppy.  I have a Grails app.  If I use POST it sees data.
> If I use PUT in same situation data does not show up in Grails App.
>
> Spying shows me data is sent.  I'm guessing tomcat handles put data
> differently than post data.

PUT data are different from POST data,  exactly by definition. Tomcat
does not do any special processing of them. (Though as Felix mentions,
some processing can be turned on).

Maybe these are wrong expectations on your side?

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: PUT Data Available in App?

Posted by Felix Schumacher <fe...@internetallee.de>.
 On Sat, 2 Apr 2011 16:50:53 -0400, Jonathan Rosenberg wrote:
> My question was sloppy.  I have a Grails app.  If I use POST it sees 
> data.
> If I use PUT in same situation data does not show up in Grails App.
>
> Spying shows me data is sent.  I'm guessing tomcat handles put data
> differently than post data.
 It might have to do something with 
 https://issues.apache.org/bugzilla/show_bug.cgi?id=48692
 which was applied in tomcat 7.0.6.

 If you want automatic parameter parsing for PUT requests, you should 
 enable "parseBodyMethods"
 in your http or ajp connector. This is described on  
 http://tomcat.apache.org/tomcat-7.0-doc/config/http.html.

 hth
  Felix

>  On Apr 2, 2011 4:44 PM, "Konstantin Kolinko" 
> <kn...@gmail.com>
> wrote:
>> 2011/4/3 Jonathan Rosenberg <sh...@gmail.com>:
>>> I've been experimenting with a REST service using Grails on Tomcat. 
>>> Some
>>> experimentation & searching online leads to believe that Tomcat 
>>> does not
>>> normally pass PUT data through to app.
>>>
>>> Is this correct?  I am using v7.
>>
>> The manager webapp (ManagerServlet) uses PUT requests. Thus it must 
>> be
> working.
>>
>> The question is what you are doing.
>>
>> Best regards,
>> Konstantin Kolinko
>>
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: PUT Data Available in App?

Posted by Jonathan Rosenberg <sh...@gmail.com>.
My question was sloppy.  I have a Grails app.  If I use POST it sees data.
If I use PUT in same situation data does not show up in Grails App.

Spying shows me data is sent.  I'm guessing tomcat handles put data
differently than post data.
 On Apr 2, 2011 4:44 PM, "Konstantin Kolinko" <kn...@gmail.com>
wrote:
> 2011/4/3 Jonathan Rosenberg <sh...@gmail.com>:
>> I've been experimenting with a REST service using Grails on Tomcat.  Some
>> experimentation & searching online leads to believe that Tomcat does not
>> normally pass PUT data through to app.
>>
>> Is this correct?  I am using v7.
>
> The manager webapp (ManagerServlet) uses PUT requests. Thus it must be
working.
>
> The question is what you are doing.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

Re: PUT Data Available in App?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/4/3 Jonathan Rosenberg <sh...@gmail.com>:
> I've been experimenting with a REST service using Grails on Tomcat.  Some
> experimentation & searching online leads to believe that Tomcat does not
> normally pass PUT data through to app.
>
> Is this correct?  I am using v7.

The manager webapp (ManagerServlet) uses PUT requests. Thus it must be working.

The question is what you are doing.

Best regards,
Konstantin Kolinko

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org