Web tier: servlets, JSP, Web frameworks: uploading file using JSP/Servlet
- Posted by: Srinivas Janakiraman
- Posted on: July 10 2001 11:30 EDT
I want to upload a file from client(browser) to the server. I am using
<FORM METHOD="Post" ENCTYPE="multipart/form-data" ACTION="Test.jsp" id=FUpload name=FUpload>
How to receive the file in action jsp.
I use O'Reilly's com.orielly.servlet.MultipartRequest to parse the file out. It will actually create a java File object for you which can then be moved and manipulated as needed.
The basic gist is you need to write a parser to handle the multipart encoding.
The package is available from O'Reilly's web site.