com.logicaldoc.web.upload
Class Upload
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.logicaldoc.web.upload.Upload
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class Upload
- extends javax.servlet.http.HttpServlet
Uploads a file into the upload temporary directory upload/
- Since:
- 4.5
- Author:
- Marco Meschieri - Logical Objects
- See Also:
- Serialized Form
Field Summary |
protected static org.apache.commons.logging.Log |
log
|
Constructor Summary |
Upload()
Constructor of the object. |
Method Summary |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
The doGet method of the servlet. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
The doPost method of the servlet. |
protected java.io.File |
getUploadDir(javax.servlet.http.HttpServletRequest request)
Computes the upload directory for the current session and creates it if
needed |
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, getServletInfo, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected static org.apache.commons.logging.Log log
Upload
public Upload()
- Constructor of the object.
doGet
public void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
- The doGet method of the servlet.
This method is called when a form has its tag value method equals to get.
- Overrides:
doGet
in class javax.servlet.http.HttpServlet
- Parameters:
request
- the request send by the client to the serverresponse
- the response send by the server to the client
- Throws:
javax.servlet.ServletException
- if an error occurred
java.io.IOException
- if an error occurred
doPost
public void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- The doPost method of the servlet.
This method is called when a form has its tag value method equals to
post.
- Overrides:
doPost
in class javax.servlet.http.HttpServlet
- Parameters:
request
- the request send by the client to the serverresponse
- the response send by the server to the client
- Throws:
org.apache.commons.fileupload.FileUploadException
javax.servlet.ServletException
- if an error occurred
java.io.IOException
- if an error occurred
getUploadDir
protected java.io.File getUploadDir(javax.servlet.http.HttpServletRequest request)
- Computes the upload directory for the current session and creates it if
needed
- Parameters:
request
-
- Returns:
- The upload folder
Copyright © 2008-2010 Logical Objects. All Rights Reserved.