org.opensha.commons.mapping.servlet
Class GMT_MapGeneratorServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by org.opensha.commons.mapping.servlet.GMT_MapGeneratorServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class GMT_MapGeneratorServlet
extends javax.servlet.http.HttpServlet

Title: GMT_MapGeneratorServlet

Description: this servlet runs the GMT script based on the parameters and generates the image file and returns that back to the calling application applet

****** ORIGINAL VERSION - VERY insecure ******* This is the order of operations: Client ==> Server: * directory name (String), or null for auto dirname * GMT script (ArrayList) * XYZ Dataset (XYZ_DatasetAPI) * Filename for XYZ Dataset (String) * Metadata (String) * Metadata filename (String) Server ==> Client: * IMG path **OR** error message * ****** NEW VERSION - more secure ******* This is the order of operations: Client ==> Server: * directory name (String), or null for auto dirname * GMT Map specification (GMT_Map) * Metadata (String) * Metadata filename (String) Server ==> Client: * Directory URL path **OR** error message

Copyright: Copyright (c) 2002

Company:

Version:
1.0
Author:
:Nitin Gupta, Vipin Gupta, and Kevin Milner
See Also:
Serialized Form

Field Summary
static String FILE_PATH
           
static String GMT_DATA_DIR
           
static String OPENSHA_FILE_PATH
           
 
Constructor Summary
GMT_MapGeneratorServlet()
           
 
Method Summary
static String createMap(SecureMapGenerator gmt, GMT_Map map, String plotDirName, String metadata, String metadataFileName)
           
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
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
 

Field Detail

OPENSHA_FILE_PATH

public static final String OPENSHA_FILE_PATH
See Also:
Constant Field Values

FILE_PATH

public static final String FILE_PATH
See Also:
Constant Field Values

GMT_DATA_DIR

public static final String GMT_DATA_DIR
See Also:
Constant Field Values
Constructor Detail

GMT_MapGeneratorServlet

public GMT_MapGeneratorServlet()
Method Detail

doGet

public void doGet(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response)
           throws javax.servlet.ServletException,
                  IOException
Overrides:
doGet in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

doPost

public void doPost(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
            throws javax.servlet.ServletException,
                   IOException
Overrides:
doPost in class javax.servlet.http.HttpServlet
Throws:
javax.servlet.ServletException
IOException

createMap

public static String createMap(SecureMapGenerator gmt,
                               GMT_Map map,
                               String plotDirName,
                               String metadata,
                               String metadataFileName)
                        throws IOException,
                               GMT_MapException
Throws:
IOException
GMT_MapException