sangita
sangita

Reputation: 11

Displaying dynamically generated images in a JSP document

Though my question seems to be a repetition, I would like to get a clear solution for this.

I am generating charts (of type .jpg or .png) using Jfreecharts in one jsp document (storing under images/file n the same project) and i wish to display it in the other one.

Though I am able to generate the charts dynamically,I am not able to display the generated charts in the other jsp document.. It returns nothing during the first run. And display the previously generated charts during the subsequent runs.

I think it may be due to static binding done n jsp or smethg.

How to display an images created dynamically in other jsp document?

Thank you for your valuable time...

Upvotes: 1

Views: 1621

Answers (1)

trashgod
trashgod

Reputation: 205775

Instead of saving the chart as a file, simply write it to the response's output stream, as shown here.

Upvotes: 1

Related Questions