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 class
Temporary 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 TypeMethodDescriptionvoid
doGet
(HttpServletRequest req, HttpServletResponse rsp) Process HTTP GET requests for chunk completion.void
doPost
(HttpServletRequest req, HttpServletResponse rsp) Processes HTTP POST requests for attachments.Returns the servlet description.Methods inherited from class org.deltava.servlet.BasicAuthServlet
authenticate, challenge
Methods inherited from class org.deltava.servlet.GenericServlet
getURL
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
Methods 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:
getServletInfo
in interfaceServlet
- Overrides:
getServletInfo
in 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:
doPost
in 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:
doGet
in classHttpServlet
- Parameters:
req
- the HTTP requestrsp
- the HTTP response- Throws:
IOException
- if something bad happens
-