org.apache.geronimo.deployment.remote
Class FileUploadServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
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
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 |
FileUploadServlet
public FileUploadServlet()
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.