This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem using jfreechart

 
albert sie
Ranch Hand
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
albert sie
Ranch Hand
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic