in that case you will have to write the code for parsing the incoming file.
Let mw give you some basics about file upload using Servlets.
1. IF you have a input type= file in your html page , then it has to have an
encoding=multi/part-fromdata.
2. If you write your own code to parse the data then you have to use the
ServletInputStream to receive the data and parse it.
3. Other problem is that in this case the HttpServletRequest's getParamater
methods will not work because they cannot deciper the encoding which is
mandatory.
4. SO you will have to write code to parse this info also, that is retreive
other parameters from the ServletInputStream .
5. So for this you will ahve to master RFC 1867, which descirbes HTML form
based file upload.
So i suggest you use OReilly 's class from www.servlets.com as indicated by
other people.
Manish
May the Force be with you
> -----Original Message-----
> From: Vikas Gupta [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, January 10, 2001 3:32 AM
> To: [EMAIL PROTECTED]
> Subject: Re: How to Read Attach file content in the Servlet
>
> Do you have any pointer where there is no additional packages are
> involved.
>
> Thanks
>
> Vikas
>
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of Jane
> Trois
> Sent: Tuesday, January 09, 2001 4:05 PM
> To: [EMAIL PROTECTED]
> Subject: Re: How to Read Attach file content in the Servlet
>
>
> This has been mentioned in the past but chapter 4 in
> Jason Hunter's Servlet Programming book covers this in
> great detail, plus he includes a handy package which
> parses multipart requests and makes life easier if you
> want to do file uploads (which I'm guessing you may
> want to do.) http://www.servlets.com has a download
> for the package.
>
> Jane
>
> --- Vikas Gupta <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > I have a HTML file in which I am using following tag
> > <input type=file name=filename value=>
> >
> > In the browser user can select the file by clicking
> > on the browse button.
> >
> > Now when user submit this information I want to read
> > the content of the
> > files. What are the possibles way to it.
> >
> > Thanks
> >
> > Vikas
> >
> >
> __________________________________________________________________________
> _
> > To unsubscribe, send email to [EMAIL PROTECTED]
> > and include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives:
> >
> http://archives.java.sun.com/archives/servlet-interest.html
> > Resources:
> >
> http://java.sun.com/products/servlet/external-resources.html
> > LISTSERV Help:
> http://www.lsoft.com/manuals/user/user.html
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Photos - Share your holiday photos online!
> http://photos.yahoo.com/
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> __________________________________________________________________________
> _
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html