uploading file using JSP/Servlet


Web tier: servlets, JSP, Web frameworks: uploading file using JSP/Servlet

  1. uploading file using JSP/Servlet (1 messages)


    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.

  2. 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.