Holger's Java API

## com.antelmann.servlet
Class PieChartImageServlet

    java.lang.Object
      javax.servlet.GenericServlet
          javax.servlet.http.HttpServlet
              com.antelmann.servlet.PieChartImageServlet

All Implemented Interfaces:
  Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

    @ThirdParty(value="uses jfree chart libraries")
    public final class PieChartImageServlet

extends javax.servlet.http.HttpServlet

generates a pie chart image based on input parameters

Author:
  Holger Antelmann
See Also:
  `doGet(HttpServletRequest, HttpServletResponse)`, Serialized Form

Constructor Summary
`PieChartImageServlet()`

Method Summary
`protected void` `doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` understands the special parameter width, height and title; all other paramters are mapped to their corresponding number value to be displayed in the chart.
`protected void` `doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` calls the GET method
`static BufferedImage` `generateChartImage(String title, Map<String,Number> data, int width, int height)`

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`

Constructor Detail

### PieChartImageServlet

    public PieChartImageServlet()

Method Detail

### generateChartImage

    public static BufferedImage generateChartImage(String title,
                                                   Map<String,Number> data,
                                                   int width,
                                                   int height)

### doPost

    protected void doPost(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws IOException,
                          javax.servlet.ServletException

  calls the GET method

  Overrides:
    `doPost` in class `javax.servlet.http.HttpServlet`
  Throws:
    `IOException`
    `javax.servlet.ServletException`

### doGet

    protected void doGet(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response)
                  throws IOException,
                         javax.servlet.ServletException

  understands the special parameter width, height and title; all other paramters are mapped to their corresponding number value to be displayed in the chart.

  Overrides:
    `doGet` in class `javax.servlet.http.HttpServlet`
  Throws:
    `IOException`
    `javax.servlet.ServletException`

(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads