<%@ page language="java" contentType="image/gif" import="java.awt.*,java.awt.image.*,java.io.*,java.util.*" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>

</HEAD>

    <jsp:useBean id="cpm" scope="session" class="ClassificationManager"/>



<body>


<%

            int fuel = cpm.getFuelWC();
            String itemTitle = cpm.getItemTitleWC();
            //cpm.processForPieChart(fuel,itemTitle);
            boolean success = cpm.makeCharts();
            BufferedImage bi = cpm.getBufferedImage();

            if(bi != null) {
                request.setAttribute("image",bi);
                RequestDispatcher rd = request.getRequestDispatcher("/dyn_img");// the String must be identical to the alias name of servelet web component 
                rd.forward(request,response);

            } //

            else {

                %>
                    <p>Image is null</p>
                <%

                System.out.println("drawPieImg.jsp, bi is null");

            } //







%>


</body>
</HTML>


