You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nagraj Rao <na...@sigmainfo.net> on 2006/12/15 14:42:06 UTC

Struts2 : Request found null with Multipart enc-type

Hi all

I'm facing a peculiar problem with one of my forms in Struts2. Whenever I submit the form uaing enc-type as multipart/form-data for file uploads, i'm unable to get any of the form fields in my action. If i remove the file widgets and enc-type attribute, i'm able to get all the form fields properly.

I've searched a lot on this but in vain. I could find a same problem in the link http://www.junlu.com/msg/309344.html. But with this guy is facing it with Struts1.x. Also no replies are found to it.

Kindly let me know if i've missed anything. Please do help. Also any suggestions or pointers to the same would be welcome.

regards,
Nagraj

Re: Struts2 : Request found null with Multipart enc-type

Posted by Don Brown <do...@gmail.com>.
If your package extends the struts-default package, and you don't
override the default interceptor stack, then I do believe the file
upload interceptor will be included.  You might also take a look at
the showcase example application, in particular, the form tags example
page, as it shows multiple controls with a file upload.

Don

On 12/15/06, Nagraj Rao <na...@sigmainfo.net> wrote:
> Exactly i'm letting S2 populate the fields thru setters in my action. I've
> not specified any interceptor in my action mappings, hope it'll take the
> default-stack which has the file upload interceptor reference in it.
>
>
> ----- Original Message -----
> From: "Don Brown" <do...@gmail.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Saturday, December 16, 2006 12:21 AM
> Subject: Re: Struts2 : Request found null with Multipart enc-type
>
>
> > How are you accessing form fields?  Are you letting Struts 2 populate
> > setters in your actions or are you extracting them yourself?  Also,
> > check that the interceptor stack you are using has the
> > fileuploadinterceptor.
> >
> > Don
> >
> > On 12/15/06, Nagraj Rao <na...@sigmainfo.net> wrote:
> >> Hi all
> >>
> >> I'm facing a peculiar problem with one of my forms in Struts2. Whenever I
> >> submit the form uaing enc-type as multipart/form-data for file uploads,
> >> i'm unable to get any of the form fields in my action. If i remove the
> >> file widgets and enc-type attribute, i'm able to get all the form fields
> >> properly.
> >>
> >> I've searched a lot on this but in vain. I could find a same problem in
> >> the link http://www.junlu.com/msg/309344.html. But with this guy is
> >> facing it with Struts1.x. Also no replies are found to it.
> >>
> >> Kindly let me know if i've missed anything. Please do help. Also any
> >> suggestions or pointers to the same would be welcome.
> >>
> >> regards,
> >> Nagraj
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 : Request found null with Multipart enc-type

Posted by Nagraj Rao <na...@sigmainfo.net>.
Exactly i'm letting S2 populate the fields thru setters in my action. I've 
not specified any interceptor in my action mappings, hope it'll take the 
default-stack which has the file upload interceptor reference in it.


----- Original Message ----- 
From: "Don Brown" <do...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Saturday, December 16, 2006 12:21 AM
Subject: Re: Struts2 : Request found null with Multipart enc-type


> How are you accessing form fields?  Are you letting Struts 2 populate
> setters in your actions or are you extracting them yourself?  Also,
> check that the interceptor stack you are using has the
> fileuploadinterceptor.
>
> Don
>
> On 12/15/06, Nagraj Rao <na...@sigmainfo.net> wrote:
>> Hi all
>>
>> I'm facing a peculiar problem with one of my forms in Struts2. Whenever I 
>> submit the form uaing enc-type as multipart/form-data for file uploads, 
>> i'm unable to get any of the form fields in my action. If i remove the 
>> file widgets and enc-type attribute, i'm able to get all the form fields 
>> properly.
>>
>> I've searched a lot on this but in vain. I could find a same problem in 
>> the link http://www.junlu.com/msg/309344.html. But with this guy is 
>> facing it with Struts1.x. Also no replies are found to it.
>>
>> Kindly let me know if i've missed anything. Please do help. Also any 
>> suggestions or pointers to the same would be welcome.
>>
>> regards,
>> Nagraj
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Struts2 : Request found null with Multipart enc-type

Posted by Don Brown <do...@gmail.com>.
How are you accessing form fields?  Are you letting Struts 2 populate
setters in your actions or are you extracting them yourself?  Also,
check that the interceptor stack you are using has the
fileuploadinterceptor.

Don

On 12/15/06, Nagraj Rao <na...@sigmainfo.net> wrote:
> Hi all
>
> I'm facing a peculiar problem with one of my forms in Struts2. Whenever I submit the form uaing enc-type as multipart/form-data for file uploads, i'm unable to get any of the form fields in my action. If i remove the file widgets and enc-type attribute, i'm able to get all the form fields properly.
>
> I've searched a lot on this but in vain. I could find a same problem in the link http://www.junlu.com/msg/309344.html. But with this guy is facing it with Struts1.x. Also no replies are found to it.
>
> Kindly let me know if i've missed anything. Please do help. Also any suggestions or pointers to the same would be welcome.
>
> regards,
> Nagraj
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org