com.logicaldoc.web.document
Class DocumentPreview
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.logicaldoc.web.document.DocumentPreview
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
public class DocumentPreview
- extends javax.servlet.http.HttpServlet
This servlet is responsible for document preview. It searches for the
attribute docId in any scope and extracts the proper document's content.
- Since:
- 4.5
- Author:
- Alessandro Gasparini - Logical Objects
- See Also:
- Serialized Form
Field Summary |
static java.lang.String |
DOC_ID
|
protected static org.apache.commons.logging.Log |
log
|
Method Summary |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
The doGet method of the servlet. |
static void |
downloadDocument(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.File file)
Sends the specified document to the response object; the client will
receive it as a download |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPost, 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 |
DOC_ID
public static final java.lang.String DOC_ID
- See Also:
- Constant Field Values
log
protected static org.apache.commons.logging.Log log
DocumentPreview
public DocumentPreview()
- 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
downloadDocument
public static void downloadDocument(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.io.File file)
throws java.io.FileNotFoundException,
java.io.IOException
- Sends the specified document to the response object; the client will
receive it as a download
- Parameters:
request
- the current requestresponse
- the document is written to this objectfileVersion
- name of the file version; if null the latest version
will be returned
- Throws:
java.io.FileNotFoundException
java.io.IOException
Copyright © 2008-2010 Logical Objects. All Rights Reserved.