Forums Register Login

showing dynamic image in web application

+Pie Number of slices to send: Send
Hi All,
I am using jboss 4.0.4 GA and trying to create an enterprise application with struts frame work.Here I want to have a dynamic image.Like on the given data I generate a chart with jfreechart and saved it as png image.Now I want to view this image.Any idea about this.How to do it?I have tried some options,like
1. reading the image file as Stringbuffer and putting it in the session after that writing in the jsp page.
2.using image tag in jsp file with source taken from properties file.
First did not work at all.Second one works in my system only i.e. on eher jboss is located not on other system.

Please help me out.
+Pie Number of slices to send: Send
Suddhasattwa,

This does not look like a JBoss specific question. I'll move this question to an appropriate forum where you might get help

Right now, it looks like the JSP or the Servlet forum are suited for your question since this is related to rendering image in a web application.
+Pie Number of slices to send: Send
Thanks for your effort.But I thought that it might also be the JBoss issue.Like where to place the file in jboss and how to configure different parameter, it depends on the application environment.
+Pie Number of slices to send: Send
 

First did not work at all.Second one works in my system only i.e. on eher jboss is located not on other system.



you should post the code snippet.Just check if Ben's advice solve your problem.
+Pie Number of slices to send: Send
Thank you raj for your advice.this really works for me.

I put the value getServletContext().getRealPath("/") in the session.it gives me the absolute path of the application.I put the dynamically generated image file there and access the file when required as request.getContextpath() in jsp page.
I got this tall by not having enough crisco in my diet as a kid. This ad looks like it had plenty of shortening:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1481 times.
Similar Threads
Image is not reloading on JSP page refresh
Deploying Dynamic file
Image directory
JBOSS CMS opening txt Files
image display quary: need help
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 16:27:38.