1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
4 <title>Cewolf Tutorial(4): Define the chart in your JSP</title>
5 <meta name="author" content="Guido Laures">
6 <link href="../cewolf.css" rel="stylesheet" type="text/css">
9 <h1>Tutorial: Step 4</h1>
10 <h2>Define the chart in your JSP</h2>
11 <pre><%@page contentType="text/html"%><br><%@taglib uri='/WEB-INF/cewolf.tld' prefix='cewolf' %><br><HTML><br><BODY><br><H1>Page View Statistics</H1><br><HR><br><jsp:useBean id="pageViews" class="de.laures.cewolf.example.PageViewCountData"/><br><cewolf:chart <br> id="line" <br> title="Page View Statistics" <br> type="line" <br> xaxislabel="Page" <br> yaxislabel="Views"><br> <cewolf:data><br> <cewolf:producer id="pageViews"/><br> </cewolf:data><br></cewolf:chart><br><p><br><cewolf:img chartid="line" renderer="cewolf" width="400" height="300"/><br><P><br></BODY><br></HTML><br></pre>
12 <p> As you can see there are different tags of the cewolf taglib
13 involved. The first <cewolf:chart> tag defines a chart with all
14 its parameters. The concrete rendering is handled by the
15 <cewolf:img> tag which adds the correct <img> tag in the
16 rendered HTML page. The connection between both cewolf tags inside the
17 JSP is specified by using the same <tt>id</tt> attributes. </p>
18 <p> When calling this JSP from a client browser you should see the page
19 view statistic chart. If you got a broken image have a look at your
20 container's log files. </p>
21 <p> <a href="step5.html">Step 5: Create ImageMap and Tooltip
22 Information>></a> </p>
23 <a height="30" target="new" href="http://sourceforge.net"><img
24 alt="SourceForge Logo" border="0" height="30"
25 src="http://sourceforge.net/sflogo.php?group_id=57282&type=5"></a>