JMSLTM Numerical Library 5.0.1

com.imsl.chart
Class ChartServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.imsl.chart.ChartServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ChartServlet
extends javax.servlet.http.HttpServlet

The base class for chart servlets.

This class requires a servlet container. Images are rendered using javax.imageio.ImageIO. This class can be used on a headless server. Java runs in a headless mode if the system property java.awt.headless=true. This class turns off caching in the ImageIO class (calls javax.imageio.ImageIO.setUseCache(false)).

See Also:
Chart Programmer's Guide: Servlets, Java Servlets, Serialized Form

Field Summary
static long serialVersionUID
           
 
Constructor Summary
ChartServlet()
           
 
Method Summary
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Returns the chart as a PNG image.
protected  Chart getChart(javax.servlet.http.HttpServletRequest request)
          Returns the chart found in the session saved with the key "chart"+id, where id is the value of the "id" parameter in the request.
 void init()
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doOptions, doPost, doPut, doTrace, getLastModified, 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, toString, wait, wait, wait
 

Field Detail

serialVersionUID

public static final long serialVersionUID
See Also:
Constant Field Values
Constructor Detail

ChartServlet

public ChartServlet()
Method Detail

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     IOException
Returns the chart as a PNG image. The HTTP request parameter "id" selects the chart.

Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - an HttpServletRequest object that contains the request the client has made of the servlet
response - an HttpServletResponse object that contains the response the servlet sends to the client
Throws:
javax.servlet.ServletException
IOException

getChart

protected Chart getChart(javax.servlet.http.HttpServletRequest request)
Returns the chart found in the session saved with the key "chart"+id, where id is the value of the "id" parameter in the request. This method can be overridden to change how charts are communicated to this servlet.

Parameters:
request - an HttpServletRequest object that contains the request the client has made of the servlet
Returns:
the chart to be rendered or null if the chart cannot be found.
See Also:
JspBean

init

public void init()
          throws javax.servlet.ServletException
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

JMSLTM Numerical Library 5.0.1

Copyright © 1970-2008 Visual Numerics, Inc.
Built July 8 2008.