at.knowcenter.wag.egov.egiz.web.servlets
Class SignServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
at.knowcenter.wag.egov.egiz.web.servlets.SignServlet
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
- public class SignServlet
- extends HttpServlet
This method is the sign servlet for the pdf-as web application. It takes get
and post requests fill out jsp templates and give the user feedback about the
results of the sign process
- Author:
- wlackner, wprinz
- See Also:
- Serialized Form
|
Method Summary |
protected void |
dispatch(HttpServletRequest request,
HttpServletResponse response,
String resource)
|
protected static void |
dispatch(HttpServletRequest request,
HttpServletResponse response,
String resource,
ServletContext context)
|
void |
dispatchToPreview(String document_text,
String connector,
String mode,
String signature_type,
String submit_url,
HttpServletRequest request,
HttpServletResponse response)
|
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
|
void |
doPost(HttpServletRequest request,
HttpServletResponse response)
Processes the sign upload. |
static String |
formatFileName(String file_name)
Formats the file name so that it is suitable for content disposition. |
static void |
prepareDispatchToErrorPage(PresentableException pe,
HttpServletRequest request)
|
protected SignServlet.UploadedData |
retrieveUploadedDataFromRequest(HttpServletRequest request)
|
static byte[] |
toByteArray(InputStream inputStream)
|
| 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 |
SignServlet
public SignServlet()
dispatch
protected void dispatch(HttpServletRequest request,
HttpServletResponse response,
String resource)
throws ServletException,
IOException
- Throws:
ServletException
IOException
dispatch
protected static void dispatch(HttpServletRequest request,
HttpServletResponse response,
String resource,
ServletContext context)
throws ServletException,
IOException
- Throws:
ServletException
IOException
doPost
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Processes the sign upload.
- Throws:
ServletException
IOException- See Also:
HttpServlet.doPost(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)
doGet
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Throws:
ServletException
IOException
retrieveUploadedDataFromRequest
protected SignServlet.UploadedData retrieveUploadedDataFromRequest(HttpServletRequest request)
throws ServletException,
UnsupportedEncodingException,
org.apache.commons.fileupload.FileUploadException,
PDFDocumentException
- Throws:
ServletException
UnsupportedEncodingException
org.apache.commons.fileupload.FileUploadException
PDFDocumentException
prepareDispatchToErrorPage
public static void prepareDispatchToErrorPage(PresentableException pe,
HttpServletRequest request)
dispatchToPreview
public void dispatchToPreview(String document_text,
String connector,
String mode,
String signature_type,
String submit_url,
HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
IOException
- Throws:
ServletException
IOException
formatFileName
public static String formatFileName(String file_name)
- Formats the file name so that it is suitable for content disposition.
- Parameters:
file_name - The file name.
- Returns:
- Returns the formatted file name.
toByteArray
public static byte[] toByteArray(InputStream inputStream)
throws IOException
- Throws:
IOException
Copyright © 2006-2010. All Rights Reserved.