Class ImageInfo

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--ImageInfo
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ImageInfo
extends javax.servlet.http.HttpServlet

Handles querying the database using a SQLRequest object and generating a XML document via a XMLGenerator object.

See Also:
Serialized Form

Constructor Summary
ImageInfo()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles requests using the 'get' method by passing to the 'post' method handler.
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles requests using the 'post' method.
 void init(javax.servlet.ServletConfig config)
          Initialize the Servlet
 void printError(java.io.PrintWriter out)
          Generates the HTML to display a message informing the user that an error occurred while accessing the database
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageInfo

public ImageInfo()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initialize the Servlet
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
config - the configuration parameters
Throws:
javax.servlet.ServletException - a Servlet error occurred

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException,
                  javax.servlet.ServletException
Handles requests using the 'get' method by passing to the 'post' method handler.
Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - the HttpRequest
response - the HttpResponse
Throws:
java.io.IOException - an I/O error occurred
javax.servlet.ServletException - a Servlet error occurred

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws java.io.IOException,
                   javax.servlet.ServletException
Handles requests using the 'post' method. Retrieves the requested image data using a SQLRequest object, generates the corresponding XML using a XMLGenerator object, and prints the XML to the web browser.
Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
request - the HttpRequest
response - the HttpResponse
Throws:
java.io.IOException - an I/O error occurred
javax.servlet.ServletException - a Servlet error occurred

printError

public void printError(java.io.PrintWriter out)
Generates the HTML to display a message informing the user that an error occurred while accessing the database
Parameters:
out - the PrintWriter to display the output