ganiganesh

Server Side Export Of Fusion Charts

Recommended Posts

Hi Team,

 

i need to do server side export of multiple charts so i had followed two ways one with J2EE and second one with Jsp but nothing is working for me.could you please suggest me which one i should follow?

 

fusion charts version : FusionCharts XT(v3.2.2) SR5

java : jdk6

 

 

Thanks in advance

Ganesh

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi Ganes,

 

First of all, could you please let us know, whether you are trying to export Flash or JavaScript charts on server using J2EE/JSP?

 

If you are exporting JavaScript charts, you would need to setup "Batik" library in your server and make sure PHP and JAVA running in your server.

 

For more information on "Exporting Pure JavaScript Charts > Setup your own server to process and export JavaScript charts", please follow the link below:

http://docs.fusioncharts.com/charts/contents/?exporting-image/ECPureJS.html

 

If you are trying to export Flash Charts using JSP, you would need to use below mentioned FusionCharts library files:

 

1. fcexporter.jar (contains all the dependency classes)

2. fcexporthandler.jar (contains the Export Handler servlet and resources)

3. /classes/fusioncharts_export.properties (configuration file)

 

The detailed step by step instruction for this is given in "Saving exported output on server disk > If J2EE:" section in the link: http://docs.fusioncharts.com/charts/contents/?exporting-image/server-side/ECServerSave.html

 

However, to export multiple charts to server at once, please follow the link: http://kb.fusioncharts.com/questions/451/How+do+I+export+charts+on+the+server+side+in+batch+mode%3F

 

Hope this helps!

 

In case if you are still facing the issue, could you please provide any sample code or error logs, if any, to better look into your issue?

 

Awaiting your response.

Share this post


Link to post
Share on other sites

Hi Sashi,

 

i am trying to export flash charts using jsp.i had followed the steps mentioned in the given link.

 

step 1) copied two jar files fcexporter.jar and fcexporthandler.jar

2) created fusioncharts_export.properties (configuration file) in classes folder

3) copied below code in web.xml

<servlet>

<display-name>FCExporter</display-name>

<servlet-name>FCExporter</servlet-name>

<servlet-class>com.fusioncharts.exporter.servlet.FCExporter</servlet-class>

<load-on-startup>1</load-on-startup>

</servlet>

<servlet-mapping>

<servlet-name>FCExporter</servlet-name>

<url-pattern>/jsp/fg/FCExporter</url-pattern>

</servlet-mapping>

4) FCExporter.jsp in jsp folder

5) added attributes in chart exportEnabled='1' exportAtClient='0' exportAction='download' exportHandler='/jsp/fg/FCExporter.jsp'

6) created chart_images folder in Webcontent for save path.

 

its not giving any error i.e. nothing is happening after rendering the charts. please find the attached files for your reference.

please let me know if i done any mistake in this process

 

 

Thanks

Ganesh

 

 

 

Hi Ganes,

 

First of all, could you please let us know, whether you are trying to export Flash or JavaScript charts on server using J2EE/JSP?

 

If you are exporting JavaScript charts, you would need to setup "Batik" library in your server and make sure PHP and JAVA running in your server.

 

For more information on "Exporting Pure JavaScript Charts > Setup your own server to process and export JavaScript charts", please follow the link below:

http://docs.fusionch...e/ECPureJS.html

 

If you are trying to export Flash Charts using JSP, you would need to use below mentioned FusionCharts library files:

 

1. fcexporter.jar (contains all the dependency classes)

2. fcexporthandler.jar (contains the Export Handler servlet and resources)

3. /classes/fusioncharts_export.properties (configuration file)

 

The detailed step by step instruction for this is given in "Saving exported output on server disk > If J2EE:" section in the link: http://docs.fusionch...ServerSave.html

 

However, to export multiple charts to server at once, please follow the link: http://kb.fusionchar...n+batch+mode%3F

 

Hope this helps!

 

In case if you are still facing the issue, could you please provide any sample code or error logs, if any, to better look into your issue?

 

Awaiting your response.

ServerExport.zip

Share this post


Link to post
Share on other sites

Hi Ganesh,

 

 

The attribute "exportHandler" in the chart element should contain the value of the export handler .ie. FCExporter. FCExporter is a servlet packed in the jar files which helps in exporting the charts.

 

Please find a sample demo attached for exporting multiple charts on server.

 

Please let us know if the demo provided is helpful.

ExportCharts.zip

Share this post


Link to post
Share on other sites

Hi Haritha,

 

chars are rendering by showing the status after that request is going to the /FCExporter and gettting 404 page not found

 

web.xml contains

<servlet>

<display-name>FCExporter</display-name>

<servlet-name>FCExporter</servlet-name>

<servlet-class>com.fusioncharts.exporter.servlet.FCExporter</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>FCExporter</servlet-name>

<url-pattern>/FCExporter</url-pattern>

</servlet-mapping>

 

and i included two jar files as well...

 

 

 

Thanks

Ganesh

 

 

 

 

Hi Ganesh,

 

 

The attribute "exportHandler" in the chart element should contain the value of the export handler .ie. FCExporter. FCExporter is a servlet packed in the jar files which helps in exporting the charts.

 

Please find a sample demo attached for exporting multiple charts on server.

 

Please let us know if the demo provided is helpful.

Share this post


Link to post
Share on other sites

Hi Haritha,

 

chars are rendering like attached image by showing the status after that request is going to the /FCExporter and gettting 404 page not found

 

web.xml contains

<servlet>

<display-name>FCExporter</display-name>

<servlet-name>FCExporter</servlet-name>

<servlet-class>com.fusioncharts.exporter.servlet.FCExporter</servlet-class>

</servlet>

<servlet-mapping>

<servlet-name>FCExporter</servlet-name>

<url-pattern>/FCExporter</url-pattern>

</servlet-mapping>

 

and i included two jar files as well...

 

 

 

Thanks

Ganesh

 

 

 

 

 

render_image.bmp

Share this post


Link to post
Share on other sites

Hi Ganesh,

 

The error 404 occurs when the path for the saved image is not found in the path specified in HTTP_URI property of "fusioncharts_export.properties".

 

Please check if the path specified in the SAVEPATH and HTTP_URI match to ensure that you are retrieving from the same path where the images are getting stored.

 

 

Eg. In the sample demo sent, the folder ExportedImages is present in WebContent.

 

SAVEPATH=./ExportedImages/
HTTP_URI=http://localhost:8080/ExportCharts/ExportedImages/

 

You could also send us your sample application for further testing.

 

Awaiting your response.

Edited by Haritha

Share this post


Link to post
Share on other sites

Hi Ganesh,

 

 

The attribute "exportHandler" in the chart element should contain the value of the export handler .ie. FCExporter. FCExporter is a servlet packed in the jar files which helps in exporting the charts.

 

Please find a sample demo attached for exporting multiple charts on server.

 

Please let us know if the demo provided is helpful.

Hi Haritha,

                    where to specify the exported chart image file name

.i am seeing the file being exported but they are with different names, something which fusion charts itself names.. 

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