skip to main content
Programmer's documentation > Building Web Applications > Developing JViews Charts JavaScript Web applications > Chart servlet package
 
Chart servlet package
All the classes needed to build Web applications are contained in the ilog.views.chart.servlet package. The core classes of the framework are the abstract IlvChartServlet and IlvChartServletSupport classes. These classes are responsible for handling the HTTP requests received, and for sending the expected response according to the request parameters.
Developing a server-side application for handling charts generation consists of creating a servlet that produces an image of a chart to the client.
The image and image maps generation are performed by the IlvChartServletSupport class according to the request parameters. The generation of the server-side charts consists of propagating the HTTP requests received by your servlet to an IlvChartServletSupport instance. This is typically implemented in the doGet (or doPost) method of an HttpServlet subclass, like in the following code:
 
public void doGet(HttpServletRequest request,
                             HttpServletResponse response)
 {
    if (!getServletSupport().handleRequest(request, response)) {
          // Handle requests other than chart image generation
          doSomething(request, response);
    }
 }
Invoking the servlet support handleRequest method is automatically performed by the IlvChartServlet class. This class can be used as the basis to develop your servlets, if you are not adding server-side functionalities to an existing application.
Chart servlet classes relationships
The following figure shows you how the mechanism works:

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.