edu.ucsb.adl.middleware
Class FootprintServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--edu.ucsb.adl.middleware.FootprintServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public final class FootprintServlet
extends javax.servlet.http.HttpServlet

Displays a footprint on a base map. This servlet is invoked by an HTTP GET request containing four parameters, north, south, east, and west, defining the boundaries of the footprint to display in signed decimal degrees north of the equator and east of the Greenwich meridian. If the URL of this servlet is S, then an example of a complete URL might be:

S?north=35.0&south=30.0&east=-115.0&west=-130.0
The return is a 360×180 JPEG image.

The following initialization parameter is required:

base_map_url
The URL of the base map. If the URL is a relative URL beginning with a slash ("/"), it is interpreted relative to the containing servlet context (i.e., the containing web application). The base map dimensions must be 360×180.
This servlet is compatible with the map service used by the ADL middleware's status service (cf. middleware configuration property status.map_server_url) and the Bucket99 driver's status servlet (cf. the bucket99-status servlet's map_server_url initialization parameter).

Version:
$Header: /export/home/gjanee/middleware/edu/ucsb/adl/middleware/RCS/FootprintServlet.java,v 1.1 2006/12/12 18:37:56 gjanee Exp $

$Log: FootprintServlet.java,v $ Revision 1.1 2006/12/12 18:37:56 gjanee Initial revision

Author:
Greg Janée
Alexandria Digital Library
See Also:
Serialized Form

Constructor Summary
FootprintServlet()
           
 
Method Summary
 void destroy()
          Frees all resources held by the servlet.
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Displays a footprint on a base map.
 void init(javax.servlet.ServletConfig config)
          Initializes the servlet.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FootprintServlet

public FootprintServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Initializes the servlet.

Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
config - Source for the above-mentioned initialization parameter.
Throws:
javax.servlet.UnavailableException - If the initialization fails.
javax.servlet.ServletException

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws java.io.IOException
Displays a footprint on a base map. This method is threadsafe.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - The HTTP request.
response - The HTTP response, which is a JPEG image.
Throws:
java.io.IOException - On any I/O error.

destroy

public void destroy()
Frees all resources held by the servlet.

Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet