com.instantbank.lettertemplate.templatePreview.web
Class PdfShowServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--com.instantbank.lettertemplate.templatePreview.web.PdfShowServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class PdfShowServlet
extends javax.servlet.http.HttpServlet

Servlet acting as a controller in order to ask ejb services for preview of a template or a component for a specified loan (used by several usecases).

Author:
InstantBank (Consuelo Franky, Rodrigo Lopez)
See Also:
Serialized Form

Field Summary
private  Debug debug
          for debugging
private  LetterTemplate letejb
          The ejb that provides the services for this servlet.
private  LetterTemplateHome lethome
          Home of ejb that provides the services for this servlet.
 
Fields inherited from class javax.servlet.http.HttpServlet
HEADER_IFMODSINCE, HEADER_LASTMOD, LSTRING_FILE, lStrings, METHOD_DELETE, METHOD_GET, METHOD_HEAD, METHOD_OPTIONS, METHOD_POST, METHOD_PUT, METHOD_TRACE
 
Fields inherited from class javax.servlet.GenericServlet
config
 
Constructor Summary
PdfShowServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Gets the bytes of a dummy letter pdf generated for a template, through an ejb service and sends the bytes to the browser
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          doPost has the same effect than doGet
 void init()
          init of servlet: obtains home ejb reference
 
Methods inherited from class javax.servlet.http.HttpServlet
, doDelete, doHead, doOptions, doPut, doTrace, getAllDeclaredMethods, getLastModified, maybeSetLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

lethome

private LetterTemplateHome lethome
Home of ejb that provides the services for this servlet.

letejb

private LetterTemplate letejb
The ejb that provides the services for this servlet.

debug

private Debug debug
for debugging
Constructor Detail

PdfShowServlet

public PdfShowServlet()
Method Detail

init

public void init()
          throws javax.servlet.ServletException
init of servlet: obtains home ejb reference
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException -  

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  java.io.IOException
Gets the bytes of a dummy letter pdf generated for a template, through an ejb service and sends the bytes to the browser
Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - HTTP request
response - HTTP response
Throws:
javax.servlet.ServletException -  
java.io.IOException -  

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws javax.servlet.ServletException,
                   java.io.IOException
doPost has the same effect than doGet
Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
request - HTTP request
response - DHTTP response
Throws:
javax.servlet.ServletException -  
java.io.IOException -