Sign in to follow this  
srividya_sharma

How do i get the HTTP post parameters for exporting ?

Recommended Posts

I need to export the bitmap stream of data from the fusionchart to the export handler in Java to render it as an buffered image to be exported on the response output stream.

 

 

 

According to what i've read,

 

FusionCharts uses POST method to send data to the server export handler.

 

Pardon me for my lack of expertise, but what are the parameters being passed and how do i obtain it?

 

 

 

I will need the width, height, bg colour and the image data stream.

 

 

 

Just by indicating exportHandler='FCExporter.java in the xml file so that i can get these (below)? Or?

 

 

 

public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException

 

{

 

int width = Integer.parseInt(req.getParameter("width")) ;

 

int height = Integer.parseInt(req.getParameter("height"));

 

String bgColorStr = req.getParameter("bgcolor");

 

String data = req.getParameter("data");

 

...}

 

 

 

I need the advice.

 

 

 

Will appreciate the help!

 

Thank you! :)

Share this post


Link to post
Share on other sites

Thank you for the link.

 

So when is all these parameters passed over in the HTTP payload?

 

It is only when "save" is clicked on the context menu?

 

Is there anyway to get these parameter by an event without having to get the user to click?

 

Perhaps to automate the clicking of "save" on the context menu?

 

 

 

My idea is to let my users will click a universal "print" button that will invoke this exportation that invokes the parameters to be passsed over in the http payload.

 

 

 

Thankyou!

Edited by Guest

Share this post


Link to post
Share on other sites

Hi

I appologize for the delay in responding. I hope you have solved your problem. If not, please take a look at the attached example.

In this jsp, the export is invoked from the click of a button.

The exportHandler is specified as FCExporter.jsp, for servlet implementation please change these attributes and the path to .swf, .jsp files, before testing.

Hope this helps.

Srividya :)

ButtonExportExample.zip

Edited by Guest

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