public class ChartServlet extends HttpServlet
This class requires a javax.servlet
Images are rendered using 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)).
| Constructor and Description |
|---|
ChartServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doGet(HttpServletRequest request,
HttpServletResponse response)
Returns the chart as a PNG image.
|
protected Chart |
getChart(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() |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicedestroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, logprotected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doGet in class HttpServletrequest - an HttpServletRequest object that contains
the request the client has made of the servletresponse - an HttpServletResponse object that contains the
response the servlet sends to the clientServletExceptionIOExceptionprotected Chart getChart(HttpServletRequest request)
request - an HttpServletRequest object that contains
the request the client has made of the servletJspBeanpublic void init()
throws ServletException
init in class GenericServletServletExceptionCopyright © 1970-2015 Rogue Wave Software
Built June 18 2015.