You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Bhagya Nair G. V." <bh...@infosys.com> on 2004/04/08 08:01:59 UTC

Request Problem with enctype="multipart/form-data"

Hello ,

 

  Got your details from
<http://archives.real-time.com/pipermail/cocoon-devel/2003-July/016255.h
tml>
http://archives.real-time.com/pipermail/cocoon-devel/2003-July/016255.ht
ml. I have a problem of reading data from request after setting
enctype="multipart/Form-data ".Since you have worked on similar cases ..
hopefully you might be able to help me out.

Problem:

 I have a JSP file which has got two hidden parameters and a file upload
button(I am reading XLS file using ,Jakarta.POI).

 On the click of the upload button I am able to read the XLS file but my
request is coming as null. If I am removing the enctype then I am able
to read the hidden parameters available in the JSP but not the XLS file.
Actually I want to read both.

 

In the below code I am getting req.getParameterNames().hasMoreElements()
as false.

 

      while(req.getParameterNames().hasMoreElements()) 

      {

            Object obj = req.getParameterNames().nextElement();

            System.out.println("Element : "+ obj);

      }  

 

Please advise ... 

 

Thanks and Regards

 

Bhagya 

 

Infosys Technologies Ltd

Direct : +91 80 51167327

India 


Re: Request Problem with enctype="multipart/form-data"

Posted by Joerg Heinicke <jo...@gmx.de>.
On 08.04.2004 08:01, Bhagya Nair G. V. wrote:

> Hello ,
> 
>   Got your details from
> <http://archives.real-time.com/pipermail/cocoon-devel/2003-July/016255.h
> tml>
> http://archives.real-time.com/pipermail/cocoon-devel/2003-July/016255.ht
> ml. I have a problem of reading data from request after setting
> enctype="multipart/Form-data ".Since you have worked on similar cases ..
> hopefully you might be able to help me out.
> 
> Problem:
> 
>  I have a JSP file which has got two hidden parameters and a file upload
> button(I am reading XLS file using ,Jakarta.POI).
> 
>  On the click of the upload button I am able to read the XLS file but my
> request is coming as null. If I am removing the enctype then I am able
> to read the hidden parameters available in the JSP but not the XLS file.
> Actually I want to read both.

There were also threads on the users list about this recently. Also in 
the thread you posted Vadim explained why it does not work without 
enabling uploads. Are you sure you have enabled them? In which way?

http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=108083493525960&w=4
http://marc.theaimsgroup.com/?l=xml-cocoon-users&m=107961307020137&w=4

Joerg