aspose file tools*
The moose likes Other Open Source Projects and the fly likes problem using jfreechart Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "problem using jfreechart " Watch "problem using jfreechart " New topic
Author

problem using jfreechart

albert sie
Ranch Hand

Joined: Jan 15, 2006
Posts: 108
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 ]

JAVA the only can called technology
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39541
    
  27
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 ]

Ping & DNS - updated with new look and Ping home screen widget
albert sie
Ranch Hand

Joined: Jan 15, 2006
Posts: 108
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
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39541
    
  27
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: problem using jfreechart
 
Similar Threads
Problems with writing image on server side
Dollar Symbol at Vertical Bar in StackedBarChar in JFreeChart
Problem using JFreeChart
Generate RADAR chart in jsp
Displaying scalable vector graphics on ibm aix