at http://www.servlets.com/resources/com.oreilly.servlet/index.html
Etienne
-----Original Message-----
From: Valeriy Molyakov [mailto:[EMAIL PROTECTED]]
Sent: mercredi 28 mars 2001 9:53
To: [EMAIL PROTECTED]
Subject: Re: File Upload
Hi!
Where I can found class MultipartRequest ?
----- Original Message -----
From: "NSB)Hiroshi Kasamatsu" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, March 28, 2001 10:12 AM
Subject: Re: File Upload
> Hi,Fabien
>
> MultipartRequest works very fine.
> You may use file stream wrongly.
>
> My coding is as follows. I make it in any file because of byte
> input-output.
>
> MultipartRequest multi=new MultipartRequest(req,".");
>
> Enumeration params=multi.getParameterNames();
> Enumeration files=multi.getFileNames();
>
>
> File f=null;
>
> String f_name=null;
> while(files.hasMoreElements()){
> f_name=(String)files.nextElement();
> f_name=f_name.trim();
>
> st_type=multi.getContentType(f_name);
> f=multi.getFile(f_name);
> }
>
> if(f!=null){
> FileInputStream fis=new FileInputStream(f);
>
> FileOutputStream fos=new FileOutputStream(fname);
> int b;
> while((b=fis.read())!=-1){
> fos.write((byte)b);
> }
> fis.close();fos.close();
> }
>
>
>
>
>
>
>
>
>
> Fabien Modoux wrote:
>
> > Hello,
> >
> > I am using Tomcat with Apache on Linux. I am using the OReilly
> > package to upload files through a servlet, but it only works
> > for text files. I found several messages in the archive about
> > that, but haven't been able to find a good solution. Does
> > anyone know how to go around or fix this problem.
> >
> > Thanks,
> >
> > -Fabien
- File Upload Fabien Modoux
- Re: File Upload Simon Chatfield
- Re: File Upload Corey A. Johnson
- Re: File Upload Hunter Hillegas
- Re: File Upload Valeriy Molyakov
- Re: File Upload NSB)Hiroshi Kasamatsu
- Re: File Upload Valeriy Molyakov
- Re: File Upload Etienne Baert \(SPS Europe\)
- Re: File Upload NSB)Hiroshi Kasamatsu
- RE: File Upload Suresh Krishna M (RBIN/DBA-JOT)
- File upload Derrick Koes
- Re: File upload Caroline Jen
- RE: File upload Shapira, Yoav
- RE: File upload Allistair Crossley
- RE: File upload Derrick Koes
- RE: File upload Allistair Crossley
- RE: File upload Derrick Koes
- RE: File upload Derrick Koes
