File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Display a Chart from a Servlet to JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Display a Chart from a Servlet to JSP" Watch "Display a Chart from a Servlet to JSP" New topic
Author

Display a Chart from a Servlet to JSP

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
How or what do I do to this servlet code or to reqesting JSP to get my chart to display?

Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

What's it doing now?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42264
    
  64
It looks as if you're creating a PDF document with an embedded chart. Be aware that there's no guarantee that it will be displayed - the user may have set the browser to save PDF files to disk, or may not have installed a PDF-displaying browser plugin.

You still need to set the content type to something appropriate ("application/pdf", if I remember correctly).


Ping & DNS - my free Android networking tools app
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Originally posted by Ben Souther:
What's it doing now?


Also, how are you initiating requests to this servlet?
From a hyperlink in a JSP page?
Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1466
    
    1
I have this working now. I am outputing a file to a server folder. Thanks. Here is my new code.


[ May 05, 2008: Message edited by: Steve Dyke ]
 
jQuery in Action, 2nd edition
 
subject: Display a Chart from a Servlet to JSP