Class UploadServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.deltava.servlet.GenericServlet
org.deltava.servlet.BasicAuthServlet
org.deltava.servlet.UploadServlet
- All Implemented Interfaces:
Serializable,Servlet,ServletConfig
A servlet to support file uploads.
- Since:
- 7.5
- Version:
- 11.1
- Author:
- Luke
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classTemporary file filter.Nested classes/interfaces inherited from class org.deltava.servlet.GenericServlet
GenericServlet.ForbiddenException, GenericServlet.NotFoundException, GenericServlet.ServletSecurityContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoGet(HttpServletRequest req, HttpServletResponse rsp) Process HTTP GET requests for chunk completion.voiddoPost(HttpServletRequest req, HttpServletResponse rsp) Processes HTTP POST requests for attachments.Returns the servlet description.Methods inherited from class org.deltava.servlet.BasicAuthServlet
authenticate, challengeMethods inherited from class org.deltava.servlet.GenericServlet
getURLMethods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, serviceMethods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log
-
Constructor Details
-
UploadServlet
public UploadServlet()
-
-
Method Details
-
getServletInfo
Returns the servlet description.- Specified by:
getServletInfoin interfaceServlet- Overrides:
getServletInfoin classGenericServlet- Returns:
- name, author and copyright info for this servlet
-
doPost
public void doPost(HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException Processes HTTP POST requests for attachments.- Overrides:
doPostin classHttpServlet- Parameters:
req- the HTTP requestrsp- the HTTP response- Throws:
IOException- if a network I/O error occursServletException
-
doGet
Process HTTP GET requests for chunk completion. Returns a 200 if the chunk is uploaded, or a 404 if not.- Overrides:
doGetin classHttpServlet- Parameters:
req- the HTTP requestrsp- the HTTP response- Throws:
IOException- if something bad happens
-