cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kogan Irina <Irina.Ko...@mchp.siemens.de>
Subject RE: Need to use getInputStream() from HttpRequest !!!
Date Tue, 27 May 2003 13:27:41 GMT
Did you try using Part from the package
org.apache.cocoon.servlet.multipart.Part instead of FilePart from
org.apache.cocoon.components.request.multipart.FilePartFile?  It has a
different set of methods though.

> -----Original Message-----
> From: Lionel Crine [mailto:crine@4dconcept.fr]
> Sent: Dienstag, 27. Mai 2003 15:14
> To: cocoon-users@xml.apache.org
> Subject: Re: Need to use getInputStream() from HttpRequest !!!
> 
> 
> I saw these examples but when I try to use fileUploadAction :
> 
> I get a nullPointerException when I try to get the File. --->
>   File file = ((FilePartFile)filePart).getFile(); IS NOT WORKING.
> The filePart is Empty.
> 
> Strange.
> My web.xml is :
> 
>      <init-param>
>        <param-name>upload-directory</param-name>
>        <param-value>WEB-INF/work/upload-dir</param-value>
>      </init-param>
> 
> 
>      <!--
>        Causes all files in multipart requests to be saved to 
> upload-dir.
>        Default is true.  Unsupported values will be 
> interpreted as false.
>      -->
>      <init-param>
>        <param-name>autosave-uploads</param-name>
>        <param-value>false</param-value>
>      </init-param>
> 
>      <!--
>        Specify handling of name conflicts when saving uploaded files
>        to disk.  Acceptable values are deny, allow, rename (default).
>        Files are renamed x_filename where x is an integer 
> value incremented
>        to make the new filename unique.
>      -->
>      <init-param>
>        <param-name>overwrite-uploads</param-name>
>        <param-value>acceptable</param-value>
>      </init-param>
> 
> that would be helpful if you find my mistake.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message