Forums Register Login

problem using jfreechart

+Pie Number of slices to send: Send
i want to use the jfreechart to create the chart iside the jsp page... but i having the problem... anyexpert here can helping me to solve the problem...

here is my jsp code:


here is my error:
"org.apache.jasper.JasperException: Unable to compile class for JSP

Generated servlet error:
Only a type can be imported. org.jfree.chart.JFreeChart resolves to a package

Generated servlet error:
Only a type can be imported. org.jfree.chart.ChartFactory resolves to a package

Generated servlet error:
Only a type can be imported. org.jfree.chart.ChartPanel resolves to a package

Generated servlet error:
Only a type can be imported. org.jfree.chart.StandardLegend resolves to a package

Generated servlet error:
Only a type can be imported. org.jfree.chart.axis.HorizontalCategoryAxis resolves to a package

Generated servlet error:
Only a type can be imported. org.jfree.chart.axis.NumberAxis resolves to a package

Generated servlet error:
Only a type can be imported. org.jfree.chart.plot.CategoryPlot resolves to a package

Generated servlet error:
Only a type can be imported. org.jfree.chart.renderer.LineAndShapeRenderer resolves to a package

Generated servlet error:
Only a type can be imported. org.jfree.data.DefaultCategoryDataset resolves to a package

Generated servlet error:
Only a type can be imported. org.jfree.ui.ApplicationFrame resolves to a package

Generated servlet error:
Only a type can be imported. org.jfree.ui.RefineryUtilities resolves to a package

An error occurred at line: 17 in the jsp file: /chart.jsp
Generated servlet error:
DefaultCategoryDataset cannot be resolved to a type

An error occurred at line: 17 in the jsp file: /chart.jsp
Generated servlet error:
DefaultCategoryDataset cannot be resolved to a type

An error occurred at line: 17 in the jsp file: /chart.jsp
Generated servlet error:
JFreeChart cannot be resolved to a type

An error occurred at line: 17 in the jsp file: /chart.jsp
Generated servlet error:
ChartFactory cannot be resolved

An error occurred at line: 17 in the jsp file: /chart.jsp
Generated servlet error:
ChartUtilities cannot be resolved


org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)"



how i can continue to let the chart can be display on the browser... thanks for your help and this is my final year project and i have to get it out... pls pls help me


thank you

regards,
albert

[ March 06, 2007: Message edited by: albert sie ]
[ March 06, 2007: Message edited by: albert sie ]
+Pie Number of slices to send: Send
Are all the jar files that come with JFreeChart in the WEB-INF/lib directory?

By the way, I doubt that this will work. JSPs are for generating text, not binary data like images. It is very easy (inadvertently) to introduce extraneous whitespace in the page, which will corrupt the image you're trying to generate. Your page looks like it does that.

I'd either create the image in a servlet, store it on the server, and then reference it from the web page, or use the cewolf tag library, which makes the whole process much easier. Seriously, why don't you look into cewolf?
[ March 06, 2007: Message edited by: Ulf Dittmer ]
+Pie Number of slices to send: Send
i try to use cewolf but i setup depend on the tutorial of the cewolf, it not work for me... so i hav to find another solution to work it up
+Pie Number of slices to send: Send
 

i try to use cewolf but i setup depend on the tutorial of the cewolf, it not work for me...


I had no problems installing and using cewolf when I followed the steps outlined in the tutorial. What problems are you facing? TellTheDetails
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 2704 times.
Similar Threads
Displaying scalable vector graphics on ibm aix
Dollar Symbol at Vertical Bar in StackedBarChar in JFreeChart
Problem using JFreeChart
Problems with writing image on server side
Generate RADAR chart in jsp
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 18:17:47.