I am having the user click a button that will generate a report on the
server side. The report has embedded charts and graphs but since the
report is generated server side with BIRT libraries, when I return the
report as an HTML string, the images aren't displayed. What I'm trying
to do is have those images downloaded to the user's machine
automatically and then adding an image widget to the panel to display
the charts and graphs. Is there some sample code I can use to do this?
I have the server side servlet code I found from and example and
modified it for my code. I am missing the client side code. Can anyone
help? Also, I'd appreciate any suggestions or advice if I'm not doing
this correctly or if there's some better way to do this.

Server side:
public class FileServlet extends HttpServlet {
        protected void doGet(HttpServletRequest req, HttpServletResponse
resp) throws
        ServletException, IOException {

                // set the responses content type
                resp.setContentType("image/svg+xml");

                // set the header for the response
                resp.setHeader("Content-Disposition", "attachment;
filename=image.svg");

                // get the output writer
                PrintWriter out = resp.getWriter();

                // display a simple message
                out.println("This is the output content");
                out.println("Probably something dynamic should go in here");

        }
}

Client Side:?

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to