New version of JFreeChart Sample WAR available
Hi Richard,
Thanks for your WAR file I am able to generate a graph from JSP. I'm not able to pass a value to the jsp script called in the URL. Apparently the session is invalidated. I am thinking another way is to customize the generateURL method of StandardCategoryURLGenerator. But I don't know how. I appreciate any help you can give me.
Thanks
Murthy
Thanks for your WAR file I am able to generate a graph from JSP. I'm not able to pass a value to the jsp script called in the URL. Apparently the session is invalidated. I am thinking another way is to customize the generateURL method of StandardCategoryURLGenerator. But I don't know how. I appreciate any help you can give me.
Thanks
Murthy
I could implement the custom URL generator with some tweaking. The j2se 1.4 compiler was not happy until I added the clone() method. I'm curious to know why.
public class urlgen implements CategoryURLGenerator {
private String todt="";
private Map trnkmap =new HashMap();
public urlgen() {};
public urlgen (String todt, Map trkmap )
{
this.todt=todt;
trnkmap=trkmap;
}
public String generateURL(CategoryDataset categoryDataset, int series, int c
ategory) {
String returnString = "";
Comparable categoryKey = categoryDataset.getColumnKey(category);
Comparable seriesKey = categoryDataset.getRowKey(series);
try {
returnString = "../../ldr/vwgraf.jsp?dt=" + todt + "&series=" + seriesKe
y
+ "&bar=" + URLEncoder.encode((String)trnkmap.get(categoryKey.toString()), "
UTF-8");
} catch (Exception e) {};
return returnString ;
}
public Object clone(){ urlgen u=new urlgen(); return (Object)u;}
}
public class urlgen implements CategoryURLGenerator {
private String todt="";
private Map trnkmap =new HashMap();
public urlgen() {};
public urlgen (String todt, Map trkmap )
{
this.todt=todt;
trnkmap=trkmap;
}
public String generateURL(CategoryDataset categoryDataset, int series, int c
ategory) {
String returnString = "";
Comparable categoryKey = categoryDataset.getColumnKey(category);
Comparable seriesKey = categoryDataset.getRowKey(series);
try {
returnString = "../../ldr/vwgraf.jsp?dt=" + todt + "&series=" + seriesKe
y
+ "&bar=" + URLEncoder.encode((String)trnkmap.get(categoryKey.toString()), "
UTF-8");
} catch (Exception e) {};
return returnString ;
}
public Object clone(){ urlgen u=new urlgen(); return (Object)u;}
}
-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
JFreeChart Sample WAR Update
I've updated the WAR file again. This source included in the WAR file at the last update was out of sync with class files. Sorry for the inconvenience. Thanks to Marie Ney for reporting the problem.
Regards,
Richard...
Regards,
Richard...
-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
JFreeChart Sample WAR
The WAR file is now updated to use JFreeChart 0.9.17.
Regards,
Richard...
Regards,
Richard...
War file don't work in Linux Slackware
Hi everybody!
I was trying to use the war file in linux, but it didn't work and did return a error message.
What I need to do, for the JFreeChart work with linux?
Thank you for atention. Any help are welcome!
I was trying to use the war file in linux, but it didn't work and did return a error message.
What I need to do, for the JFreeChart work with linux?
Thank you for atention. Any help are welcome!
Code: Select all
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.xy_005farea_005fchart_jsp._jspService(xy_005farea_005fchart_jsp.java:94)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
root cause
java.lang.NoClassDefFoundError
org.jfree.chart.axis.Axis.<init>(Axis.java:180)
org.jfree.chart.axis.ValueAxis.<init>(ValueAxis.java:226)
org.jfree.chart.axis.DateAxis.<init>(DateAxis.java:333)
org.jfree.chart.axis.DateAxis.<init>(DateAxis.java:318)
org.jfree.chart.demo.servlet.WebHitChart.generateXYAreaChart(WebHitChart.java:233)
org.apache.jsp.xy_005farea_005fchart_jsp._jspService(xy_005farea_005fchart_jsp.java:51)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat logs.
War file don't work in Linux Slackware
To complements.
I'm using Slackware 9.1
Thank you again.
Rodrigo G. Tavares de Souza
São Paulo - Brazil
+55 (11) 3824-6859
I'm using Slackware 9.1
Thank you again.
Rodrigo G. Tavares de Souza
São Paulo - Brazil
+55 (11) 3824-6859
-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
JFreeChart Sample WAR Updated
The WAR file is now updated to use JFreeChart 0.9.18.
Regarding the other problems, I don't use Linux myself but Dave Gilbert does. He and a number of others have got the sample WAR file working successfully on a variety of distros.
When downloading make sure that you are trying to save the WAR file rather than open it in the browser. Also when deploying in your application server make sure you are either running "headless" or have an X server available. Search the forum for X11 for more information.
Regards,
Richard...
Regarding the other problems, I don't use Linux myself but Dave Gilbert does. He and a number of others have got the sample WAR file working successfully on a variety of distros.
When downloading make sure that you are trying to save the WAR file rather than open it in the browser. Also when deploying in your application server make sure you are either running "headless" or have an X server available. Search the forum for X11 for more information.
Regards,
Richard...
Thank you Richard!richard_atkinson wrote:I don't use Linux myself but Dave Gilbert does. He and a number of others have got the sample WAR file working successfully on a variety of distros.
I could use the war file. I needed install the Xvfb to emulate the X11 server, because as my Server do not has XWindows, I needed make it.
Everybody, can see more information at url that follow below:
http://forum.java.sun.com/thread.jsp?th ... ge=1973308
pgerio - from java technology forums wrote: My solution is simple. I've worked one day on it.
You just install Xvfb (you can get it from the web or Linux distributions). The name of the file is XFree86-Xvfb-xxxxxx.rpm.Code: Select all
To istall, run: $ rpm -iv XFree86-Xvfb-xxxxxx.rpm Then you run it in background(&) : $ Xvfb :1 -screen 0 800x600x16 & And set the DISPLAY variable: $ export DISPLAY=:1.0
-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
JFreeChart Sample WAR Updated
The WAR file is now updated to use JFreeChart 0.9.19.
Regards,
Richard...
Regards,
Richard...
I got the same problem as black_fire's, Who can help?
The error is same. Tomcat5 could not find classes. My linux is redhat8.
//////// //////// //////////// /// //////////////
/// /// /// /// /// ///
/// /// /// /// /// ///
///////////// //////////// /// //////////////
/// /// /// /// ///
/// /// /// /// /// ///
////// /////// //////////// ////////////// ///
//////// //////// //////////// /// //////////////
/// /// /// /// /// ///
/// /// /// /// /// ///
///////////// //////////// /// //////////////
/// /// /// /// ///
/// /// /// /// /// ///
////// /////// //////////// ////////////// ///
-
- Posts: 115
- Joined: Fri Mar 14, 2003 3:13 pm
- Location: London, England
- Contact:
JFreeChart Sample WAR
The WAR file is now updated to use JFreeChart 0.9.20.
Regards,
Richard...
P.S. To the poster above, I test the WAR file using Tomcat 5 and it works alright for me. Try searching for forum for X11 issues and make sure you do not have any other copies of JFreeChart lurking anywhere in your Tomcat installation.
Regards,
Richard...
P.S. To the poster above, I test the WAR file using Tomcat 5 and it works alright for me. Try searching for forum for X11 issues and make sure you do not have any other copies of JFreeChart lurking anywhere in your Tomcat installation.
-
- Posts: 1
- Joined: Mon Jul 12, 2004 11:30 am
about org.jfree
Hi everyone:
Im wondering if anyone of you know where can i get the java files of the org.jfree
thanks
Im wondering if anyone of you know where can i get the java files of the org.jfree
thanks
