Sign in to follow this  
srinivas

How To Export Fusion Charts At Server Side In Jsp

Recommended Posts

Can any one suggest me the process of how to save the fusioncharts at server side....

 

I am using Javascript to render the chart . The capturing phase was successfull and it was throwing an

 

Exception "The requested resource (/fcexports/FCExporter) is not available".

 

Can any one suggest how to implement saving fusioncharts at server side and what are the

 

files i need to include in my project to save....

Share this post


Link to post
Share on other sites
Guest Angshu

i have tried exporting to server side....

 

But my tomcat showing errors as

 

 

 

 

HTTP Status 500 -

type Exception report

 

message

 

description The server encountered an internal error () that prevented it from fulfilling this request.

 

 

 

exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 12 in the generated java fileOnly a type can be imported. com.fusioncharts.exporter.ErrorHandler resolves to a packageAn error occurred at line: 115 in the jsp file: /FCExporter.jspThe method parseExportRequestStream(FusionChartsExportData) in the type FusionChartsExportHelper is not applicable for the arguments (HttpServletRequest)112: String pathSeparator = File.separator; // will return either "\" or "/", depends on OS113: 114: 115: ExportBean localExportBean=FusionChartsExportHelper.parseExportRequestStream(request);116: 117: String exportFormat = (String)localExportBean.getExportParameterValue("exportformat");118: String exporterFilePath = FusionChartsExportHelper.getExporterFilePath(exportFormat);An error occurred at line: 118 in the jsp file: /FCExporter.jspThe method getExporterFilePath(String) is undefined for the type FusionChartsExportHelper115: ExportBean localExportBean=FusionChartsExportHelper.parseExportRequestStream(request);116: 117: String exportFormat = (String)localExportBean.getExportParameterValue("exportformat");118: String exporterFilePath = FusionChartsExportHelper.getExporterFilePath(exportFormat);119: String exportTargetWindow = (String)localExportBean.getExportParameterValue("exporttargetwindow");120: 121: String exportAction = (String)localExportBean.getExportParameterValue("exportaction");An error occurred at line: 179 in the jsp file: /FCExporter.jspErrorHandler cannot be resolved176: String fileNameWithoutExt = (String)localExportBean.getExportParameterValue("exportfilename");177: String extension = FusionChartsExportHelper.getExtensionFor(exportFormat.toLowerCase());178: String fileName = fileNameWithoutExt+"."+ extension; 179: err_warn_Codes.append(ErrorHandler.checkServerSaveStatus(WEB_ROOT_PATH,fileName));180: 181: }182: Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439) org.apache.jasper.compiler.Compiler.compile(Compiler.java:349) org.apache.jasper.compiler.Compiler.compile(Compiler.java:327) org.apache.jasper.compiler.Compiler.compile(Compiler.java:314) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:326) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.

 

 

My file Structure in eclipse, chartdata , and fusionchart_properties files are attached... Please inform me if there are any corrections....

My fusion charts.zip

Share this post


Link to post
Share on other sites
Guest Bindhu

i have tried exporting to server side....

 

But my tomcat showing errors as

 

 

 

 

HTTP Status 500 -

type Exception report

 

message

 

description The server encountered an internal error () that prevented it from fulfilling this request.

 

 

 

exception org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred at line: 12 in the generated java fileOnly a type can be imported. com.fusioncharts.exporter.ErrorHandler resolves to a packageAn error occurred at line: 115 in the jsp file: /FCExporter.jspThe method parseExportRequestStream(FusionChartsExportData) in the type FusionChartsExportHelper is not applicable for the arguments (HttpServletRequest)112: String pathSeparator = File.separator; // will return either "\" or "/", depends on OS113: 114: 115: ExportBean localExportBean=FusionChartsExportHelper.parseExportRequestStream(request);116: 117: String exportFormat = (String)localExportBean.getExportParameterValue("exportformat");118: String exporterFilePath = FusionChartsExportHelper.getExporterFilePath(exportFormat);An error occurred at line: 118 in the jsp file: /FCExporter.jspThe method getExporterFilePath(String) is undefined for the type FusionChartsExportHelper115: ExportBean localExportBean=FusionChartsExportHelper.parseExportRequestStream(request);116: 117: String exportFormat = (String)localExportBean.getExportParameterValue("exportformat");118: String exporterFilePath = FusionChartsExportHelper.getExporterFilePath(exportFormat);119: String exportTargetWindow = (String)localExportBean.getExportParameterValue("exporttargetwindow");120: 121: String exportAction = (String)localExportBean.getExportParameterValue("exportaction");An error occurred at line: 179 in the jsp file: /FCExporter.jspErrorHandler cannot be resolved176: String fileNameWithoutExt = (String)localExportBean.getExportParameterValue("exportfilename");177: String extension = FusionChartsExportHelper.getExtensionFor(exportFormat.toLowerCase());178: String fileName = fileNameWithoutExt+"."+ extension; 179: err_warn_Codes.append(ErrorHandler.checkServerSaveStatus(WEB_ROOT_PATH,fileName));180: 181: }182: Stacktrace: org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330) org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:439) org.apache.jasper.compiler.Compiler.compile(Compiler.java:349) org.apache.jasper.compiler.Compiler.compile(Compiler.java:327) org.apache.jasper.compiler.Compiler.compile(Compiler.java:314) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:326) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

 

note The full stack trace of the root cause is available in the Apache Tomcat/6.0.32 logs.

 

 

My file Structure in eclipse, chartdata , and fusionchart_properties files are attached... Please inform me if there are any corrections....

 

Hi,

 

The exception error shown above could be because of missing classes, as the compiler is unable to find the particular class., Jar file issue.

 

In the message above, the "org.apache.jasper.JasperExecution" class is not found by the compiler.

A probable solution could be to include the jar file's path in the CLASSPATH; either in Tomcat's CLASSPATH or the project's CLASSPATH.

As is seen in the image posted, the jar file has been placed correctly under the 'lib' directory. However, I doubt if you have missed to include the same in the CLASSPATH.

Also, please check the path and verify if the jar file is present in the path mentioned.

 

Hope this helps !!

Edited by Bindhu

Share this post


Link to post
Share on other sites

Hi,

 

Thank you for ur reply...

 

I have done what u have said....

 

But the problem now is that, the capturing phase of the fusioncharts is successfull. but after that it was not saving the images. and keeps idle.

 

I am not getting what is the problem.

Share this post


Link to post
Share on other sites
Guest Bindhu

Hi Srinivas,

 

Can you please ensure that the SAVEPATH is proper, i.e it is relative to web application root and the folder to which you are trying to save the image has WRITE permission ??

Hope this helps!!

Edited by Bindhu

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this