com.instantbank.lettertemplate.imagesRepository.web
Class ImageShowServlet

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

public class ImageShowServlet
extends javax.servlet.http.HttpServlet

Servlet acting as a controller in order to ask ejb services for image View action in imagesRepository usecase.

Author:
InstantBank (Consuelo Franky, Jorge Cardenas)
See Also:
Serialized Form

Field Summary
private  Debug debug
           
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
ImageShowServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Gets the bytes of an image from the database, 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
Constructor Detail

ImageShowServlet

public ImageShowServlet()
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 an image from the database, 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 - Description of the Parameter
response - Description of the Parameter
Throws:
javax.servlet.ServletException -  
java.io.IOException -