Tutorial: Step 4

Define the chart in your JSP

<%@page contentType="text/html"%>
<%@taglib uri='/WEB-INF/cewolf.tld' prefix='cewolf' %>
<HTML>
<BODY>
<H1>Page View Statistics</H1>
<HR>
<jsp:useBean id="pageViews" class="de.laures.cewolf.example.PageViewCountData"/>
<cewolf:chart
id="line"
title="Page View Statistics"
type="line"
xaxislabel="Page"
yaxislabel="Views">
<cewolf:data>
<cewolf:producer id="pageViews"/>
</cewolf:data>
</cewolf:chart>
<p>
<cewolf:img chartid="line" renderer="cewolf" width="400" height="300"/>
<P>
</BODY>
</HTML>

As you can see there are different tags of the cewolf taglib involved. The first <cewolf:chart> tag defines a chart with all its parameters. The concrete rendering is handled by the <cewolf:img> tag which adds the correct <img> tag in the rendered HTML page. The connection between both cewolf tags inside the JSP is specified by using the same id attributes.

When calling this JSP from a client browser you should see the page view statistic chart. If you got a broken image have a look at your container's log files.

Step 5: Create ImageMap and Tooltip Information>>

SourceForge Logo