wood burning stoves 2.0*
The moose likes JSP and the fly likes showing dynamic image in web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "showing dynamic image in web application" Watch "showing dynamic image in web application" New topic
Author

showing dynamic image in web application

Suddhasattwa Mukherjee
Ranch Hand

Joined: May 28, 2008
Posts: 52
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.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9941
    
159

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.


[My Blog] [JavaRanch Journal]
Suddhasattwa Mukherjee
Ranch Hand

Joined: May 28, 2008
Posts: 52
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.
raj malhotra
Ranch Hand

Joined: Feb 22, 2007
Posts: 285
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.
Suddhasattwa Mukherjee
Ranch Hand

Joined: May 28, 2008
Posts: 52
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: showing dynamic image in web application
 
Similar Threads
Deploying Dynamic file
image display quary: need help
Image is not reloading on JSP page refresh
Image directory
JBOSS CMS opening txt Files