Hi Friends,
I am using JFreeChart in my web application. I managed to display the charts in my local host server and was very happy to see its working until i upload it in to my production server.
Charts are not displaying in my production server which is having tomcat 5.0.27.Does this version has any issue on displaying the charts?
I am working hard to find a solution. please help me with any suggestions and solution.
Thanks,
Muthu
jfreechart is not displaying in my production server
Have you checked this?
http://www.jfree.org/jfreechart/faq.html#FAQ10
http://www.jfree.org/jfreechart/faq.html#FAQ10
Hi,
thanks for your suggestion. that helped me think about my problem in different way. but the problem is java is platform independent right? the article guided me to use headless Awt toolkit. In my application the production server is Linux and my work machine is windows. i still didn't get an exact solution. help me pl.
thanks for your suggestion. that helped me think about my problem in different way. but the problem is java is platform independent right? the article guided me to use headless Awt toolkit. In my application the production server is Linux and my work machine is windows. i still didn't get an exact solution. help me pl.
Java-applications are platform independent by running inside a Java-Virtual Machine, which is platform dependent. Please, read the ReadMe file of your JDK and look for explanations of what the headless mode is and what it does.muthuram wrote:Hi,
but the problem is java is platform independent right? the article guided me to use headless Awt toolkit.
As a programmer you should have some basic knowledge on how your code is going to run, or you will most likely face some similar platform-specific issues later.
JFreeChart chart = ChartFactory.createPieChart3D("", pieDataset, true, true, false);%>
<%="chart ="+chart%>
<%
// Write the chart image to the temporary directory
ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
String imageMap = ChartUtilities.getImageMap("map", info);
session.setAttribute("imageMap",imageMap);
filename = ServletUtilities.saveChartAsPNG(chart, 300, 350, null, session);
// Write the image map to the PrintWriter
ChartUtilities.writeImageMap(writer, filename, info,true);
writer.flush();
}
catch (Exception e) {
System.out.println("Problem occurred creatingPie chart." +e);
}
System.out.println("filename"+filename);
String graphURL =request.getContextPath() + "/servlet/DisplayChart?filename=" + filename;
System.out.println("graph"+graphURL);
%>
<%="filename ="+filename%>
hello friends,
above is my code for generating and displaying graph in my web app(this is a sample). In this I am getting some instance like "chart =org.jfree.chart.JFreeChart@19cceab" when i print the output of chart. but i am not getting the filename. it is showing no values(empty). I think the problem is not with the server configuration as we discussed earlier. but anyway I couldn't find exact error. could any body suggest me a solution pl.
Thanks,
Muthu
<%="chart ="+chart%>
<%
// Write the chart image to the temporary directory
ChartRenderingInfo info = new ChartRenderingInfo(new StandardEntityCollection());
String imageMap = ChartUtilities.getImageMap("map", info);
session.setAttribute("imageMap",imageMap);
filename = ServletUtilities.saveChartAsPNG(chart, 300, 350, null, session);
// Write the image map to the PrintWriter
ChartUtilities.writeImageMap(writer, filename, info,true);
writer.flush();
}
catch (Exception e) {
System.out.println("Problem occurred creatingPie chart." +e);
}
System.out.println("filename"+filename);
String graphURL =request.getContextPath() + "/servlet/DisplayChart?filename=" + filename;
System.out.println("graph"+graphURL);
%>
<%="filename ="+filename%>
hello friends,
above is my code for generating and displaying graph in my web app(this is a sample). In this I am getting some instance like "chart =org.jfree.chart.JFreeChart@19cceab" when i print the output of chart. but i am not getting the filename. it is showing no values(empty). I think the problem is not with the server configuration as we discussed earlier. but anyway I couldn't find exact error. could any body suggest me a solution pl.
Thanks,
Muthu
Re:
I am having the same problem.We set headless=true and still the graph is not displaying.I am getting message"Negative Values will not be displayed on the graph " error on Weblogic server in dev environment.Any clues will be helpful.muthuram wrote: ↑Sat Dec 06, 2008 3:15 pmHi,
thanks for your suggestion. that helped me think about my problem in different way. but the problem is java is platform independent right? the article guided me to use headless Awt toolkit. In my application the production server is Linux and my work machine is windows. i still didn't get an exact solution. help me pl.