Are you using something like Struts, which grabs the request from you with
multiparts?  Try seeing if you have the request.

On 1/24/06, Tim Oliver Wagner <[EMAIL PROTECTED]> wrote:
>
> Hello,
> I write a web application with JSPs (running at tomcat-server). My problem
> occours with uploadingfiles.
>
> At the jsp-Page I defined this HTML-FORM (browser: Mozilla Firefox):
>
> <h1>Hochladen einer Datei</h1>
>
> <form action=<%= request.getRequestURL()%> method="post"
> ENCTYPE='multipart/form-data'>
>         Datei: <input type="file" size="50" name="datei" maxlength="10000"
> accept="text/*"/><br/>
>         <input type="submit" name="action" value="upload file" />
> </form>
>
> Now I try to parse the Multipart-Message:
> if (FileUpload.isMultipartContent(request)) {
>         try {
>                 // ENCTYPE='multipart/form-data' Daten rauslesen!!!
>                 FileItemFactory factory = new DiskFileItemFactory();
>                 ServletFileUpload upl = new ServletFileUpload(factory);
>                 java.util.List items = upl.parseRequest(request);
>                 .........
>
> At the last line (java.util.List items ....) the error accurs. But I dont
> understand why ...
>
> I hope someone can help me.
>
> tia
>
> Oli
>
> PS:
> I think I did everything in that way like at
> http://jakarta.apache.org/commons/fileupload/using.html descibed.
>
>
>


--
"You can lead a horse to water but you cannot make it float on its back."
~Dakota Jack~

Reply via email to