Here's the reason why (unrelated to Struts):
https://jira.springsource.org/browse/SPR-7030


On Tue, Feb 11, 2014 at 3:41 PM, Dong Qiu <dong...@gmail.com> wrote:

> I issue the PUT request using Jquery's.
>
> $.ajax({
>   url: '/test-action/99',
>   type: 'PUT',
>   data: "name=test",
>   contentType : "application/x-www-form-urlencoded",
>   success: function(data) {
>     alert('...');
>   }
> });
>
> (If I change PUT to POST, I can retrieve the name=test in test-action)
>
> I am using Jboss 7.0.2. Guess that http put method is not enabled in its
> Tomcat by default, so the "name=test"
> is not put into the requestParamterMap by the container and struts2 core
> actions do not handle parsing the msg body and put it into the Map for the
> PUT req.
>
> Thank you
>
>
>
>
> On Tue, Feb 11, 2014 at 7:19 AM, Paul Benedict <pbened...@apache.org>
> wrote:
>
> > Dong, how are you issuing your HTTP PUT request? You can't do it through
> > HTML since HTML does not support those verbs. Are you doing it in
> > Javascript?
> >
> >
> > On Tue, Feb 11, 2014 at 5:06 AM, Dave Newton <davelnew...@gmail.com>
> > wrote:
> >
> > > My initial guess would be because the additional HTTP verbs besides get
> > and
> > > post don't usually come from browsers.
> > >  On Feb 11, 2014 2:12 AM, "Dong Qiu" <dong...@gmail.com> wrote:
> > >
> > > > Hi,
> > > >
> > > > When I do a HTTP PUT request with message body. eg. x=12. It does not
> > > seem
> > > > to be put into the requestParamters. (e.g cannot find the x=12 entry
> in
> > > > request.getParameterMap )
> > > >
> > > > I was told to try REST plugin. However, Just wondering why parsing
> the
> > > PUT
> > > > request message body and putting the entries into the paramterMap is
> > not
> > > > supported in Struts2.3.16 core action?
> > > >
> > > > Thank you
> > > >
> > >
> >
> >
> >
> > --
> > Cheers,
> > Paul
> >
>
>
>
> --
> Dong Qiu
>



-- 
Cheers,
Paul

Reply via email to