This week's book / license giveaways are in the JDBC and Relational Databases and Java in General forums.
We're giving away four copies each of PostGIS in Action and Java Advanced Topics Training and have the authors on-line!
See this thread and this one for details.
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: 1531
    
    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
Rancher

Joined: Mar 22, 2005
Posts: 42955
    
  73
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).
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: 1531
    
    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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Display a Chart from a Servlet to JSP