Actually..its not easy mostly because uploading a file requires a
multi-part. In the servlet that handles uploads, the normal
request.getParameter() no longer works. Instead, you have to read in the
entire stream of bytes, then parse it into name/value pairs in a hashmap.
>From there, you can then look up your "request" parameters via the map of
name/value pairs. However, I used the Oriely servlet with little problems.
You may have to get the source of it, and modify the source a bit to your
needs.


> -----Original Message-----
> From: Pantarotto, Sio [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 02, 2001 6:34 PM
> To: [EMAIL PROTECTED]
> Subject: Is uploading files that complicate????
>
>
> Dear everybody,
>
> I have a web application that will allow users to create
> folders in the
> server side and upload files to them.
>
> I have been looking at some examples on how to do it but all
> of them are
> really confusing.
> I took a look at Oreilly classes but I also got lost.
>
> Does anyone know a simple example to do it???
>
> All I need is a servlet that will upload a file and store it in a path
> passed in the request (this will identify the user and the folder).
>
> Thanks a lot
>
> Siomara
>
> PS: Also, If someone can explain how this is supposed to be
> handled I do
> appreciate.
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to