This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin for Android App Development and have Peter Sommerhoff on-line!
See this thread for details.
Win a copy of Kotlin for Android App Development this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

problem using jfreechart  RSS feed

 
Ranch Hand
Posts: 108
  • 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 ]
 
Rancher
Posts: 42974
76
  • 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
  • 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
Posts: 42974
76
  • 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
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!