You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Mircea Zahan <mz...@adaptive.ro> on 2008/06/03 01:36:33 UTC

FileUpload - ServletFileUpload.parseRequest() returning empty list

Hi everybody.

Maybe this question has been already asked, 
but since there is no mail archive search facility,
I will ask it (again?).

I copy-pasted (for the sake of corectness) the code
from the tutorial in my own servlet's doPost method:

FileItemFactory factory = new DiskFileItemFactory();
ServletFileUpload upload = new ServletFileUpload(factory);
List items = upload.parseRequest(request);


Before jumping, I did read the FAQ. The first question there
is my issue. But it has an answer which is vague at best.
"This most commonly happens when the request has already
been parsed, or processed in some other way".
Well, my tomcat is .... naked. It has no filters, no other servlets.
Who could steal my files? I'm cooking my brains on this since
yesterday with no luck. :(

Any suggestion is appreciated.

Thank you in advance,
Mircea.

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


Re: FileUpload - ServletFileUpload.parseRequest() returning empty list

Posted by Mircea Zahan <mz...@adaptive.ro>.
Ok, so I was the one that flunked, mea culpa.

I'm developing with AJAX since more than two years
and I am used to manually assembling all the page params,
by using the "id" attribute, of course.

But in a form all params must have a name :)


>>> Hi everybody.
>>>
>>> Maybe this question has been already asked, but since there is no mail
>>> archive search facility
>> 
>> 
>> Huh?
>> 
>> http://mail-archives.apache.org/
>> http://commons.markmail.org/
>> http://www.mail-archive.com/user@commons.apache.org/
>> http://marc.info/?l=jakarta-commons-user&r=1&w=2
>> http://www.nabble.com/Commons---User-f319.html
>> http://dir.gmane.org/gmane.comp.jakarta.commons.user
>> 
>> None of those work for you??
> 
> And where would these links be listed ? It would be nice if they
> were on commons Mailing Lists page.
> 
> 
>>> ,I will ask it (again?).
>>>
>>> I copy-pasted (for the sake of corectness) the code
>>> from the tutorial in my own servlet's doPost method:
>>>
>>> FileItemFactory factory = new DiskFileItemFactory();
>>> ServletFileUpload upload = new ServletFileUpload(factory);
>>> List items = upload.parseRequest(request);
>>>
>>>
>>> Before jumping, I did read the FAQ. The first question there
>>> is my issue. But it has an answer which is vague at best.
>>> "This most commonly happens when the request has already
>>> been parsed, or processed in some other way".
>>> Well, my tomcat is .... naked. It has no filters, no other servlets.
>>> Who could steal my files? I'm cooking my brains on this since
>>> yesterday with no luck. :(
>>>
>> 
>>>
>>> Any suggestion is appreciated.
>> 
>> 
>> Well, you haven't told us what you have already tried, what you have
>> verified, and what approach you have taken to tracking down the problem, so
>> we wouldn't really know where to start with helping you out.
> 
> To make a two days long story short: I used the "id" attribute
> on the "file" input insted of "name".
> 
> Darn, all the other HTML components work by the "id" attribute,
> only this one works by the "name". The guys from w3c really flunked
> on this one.
> 
> Of course, there is always the RTFM issue, I blame myself for not
> carefully doing it ... 'cause I did it ... but, obviously, not well enough.
> 
>> 
>> --
>> Martin Cooper
>> 
>> 
>> 
>>> Thank you in advance,
>>> Mircea.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>>> For additional commands, e-mail: user-help@commons.apache.org
>>>
>>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>

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


Re: FileUpload - ServletFileUpload.parseRequest() returning empty list

Posted by Mircea Zahan <mz...@adaptive.ro>.
>> Hi everybody.
>>
>> Maybe this question has been already asked, but since there is no mail
>> archive search facility
> 
> 
> Huh?
> 
> http://mail-archives.apache.org/
> http://commons.markmail.org/
> http://www.mail-archive.com/user@commons.apache.org/
> http://marc.info/?l=jakarta-commons-user&r=1&w=2
> http://www.nabble.com/Commons---User-f319.html
> http://dir.gmane.org/gmane.comp.jakarta.commons.user
> 
> None of those work for you??

And where would these links be listed ? It would be nice if they
were on commons Mailing Lists page.


>> ,I will ask it (again?).
>>
>> I copy-pasted (for the sake of corectness) the code
>> from the tutorial in my own servlet's doPost method:
>>
>> FileItemFactory factory = new DiskFileItemFactory();
>> ServletFileUpload upload = new ServletFileUpload(factory);
>> List items = upload.parseRequest(request);
>>
>>
>> Before jumping, I did read the FAQ. The first question there
>> is my issue. But it has an answer which is vague at best.
>> "This most commonly happens when the request has already
>> been parsed, or processed in some other way".
>> Well, my tomcat is .... naked. It has no filters, no other servlets.
>> Who could steal my files? I'm cooking my brains on this since
>> yesterday with no luck. :(
>>
> 
>>
>> Any suggestion is appreciated.
> 
> 
> Well, you haven't told us what you have already tried, what you have
> verified, and what approach you have taken to tracking down the problem, so
> we wouldn't really know where to start with helping you out.

To make a two days long story short: I used the "id" attribute
on the "file" input insted of "name".

Darn, all the other HTML components work by the "id" attribute,
only this one works by the "name". The guys from w3c really flunked
on this one.

Of course, there is always the RTFM issue, I blame myself for not
carefully doing it ... 'cause I did it ... but, obviously, not well enough.

> 
> --
> Martin Cooper
> 
> 
> 
>> Thank you in advance,
>> Mircea.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
>> For additional commands, e-mail: user-help@commons.apache.org
>>
>>
>

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


Re: FileUpload - ServletFileUpload.parseRequest() returning empty list

Posted by Martin Cooper <ma...@apache.org>.
On Mon, Jun 2, 2008 at 4:36 PM, Mircea Zahan <mz...@adaptive.ro> wrote:

> Hi everybody.
>
> Maybe this question has been already asked, but since there is no mail
> archive search facility


Huh?

http://mail-archives.apache.org/
http://commons.markmail.org/
http://www.mail-archive.com/user@commons.apache.org/
http://marc.info/?l=jakarta-commons-user&r=1&w=2
http://www.nabble.com/Commons---User-f319.html
http://dir.gmane.org/gmane.comp.jakarta.commons.user

None of those work for you??


> ,I will ask it (again?).
>
> I copy-pasted (for the sake of corectness) the code
> from the tutorial in my own servlet's doPost method:
>
> FileItemFactory factory = new DiskFileItemFactory();
> ServletFileUpload upload = new ServletFileUpload(factory);
> List items = upload.parseRequest(request);
>
>
> Before jumping, I did read the FAQ. The first question there
> is my issue. But it has an answer which is vague at best.
> "This most commonly happens when the request has already
> been parsed, or processed in some other way".
> Well, my tomcat is .... naked. It has no filters, no other servlets.
> Who could steal my files? I'm cooking my brains on this since
> yesterday with no luck. :(
>

>
> Any suggestion is appreciated.


Well, you haven't told us what you have already tried, what you have
verified, and what approach you have taken to tracking down the problem, so
we wouldn't really know where to start with helping you out.

--
Martin Cooper



> Thank you in advance,
> Mircea.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>