org.apache.geronimo.deployment.remote
Class FileUploadServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.apache.geronimo.deployment.remote.FileUploadServlet
All Implemented Interfaces:
Serializable, Servlet, ServletConfig

public class FileUploadServlet
extends HttpServlet

A servlet that accepts file uploads. It takes only POST requests, which should contain a Java "DataOutput" formatted stream containing: 1) an int, the number of files being uploaded 2) for each file: 1) an int, the length of the file in bytes 2) a number of raw bytes equal to the above for the file It returns a serialized stream containing: 1) a UTF string, the status (should be "OK") 2) an int, the number of files received 3) for each file: 1) a UTF String, the path to the file as saved to the server's filesystem The file positions in the response will be the same as in the request. The is, a name for upload file #2 will be in response position #2.

See Also:
Serialized Form

Constructor Summary
FileUploadServlet()
           
 
Method Summary
protected  void doPost(HttpServletRequest request, HttpServletResponse response)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUploadServlet

public FileUploadServlet()
Method Detail

doPost

protected void doPost(HttpServletRequest request,
                      HttpServletResponse response)
               throws ServletException,
                      IOException
Overrides:
doPost in class HttpServlet
Throws:
ServletException
IOException


Copyright © 2003-2007 Apache Software Foundation. All Rights Reserved.