aspose file tools*
The moose likes JSP and the fly likes Problem in accessing dynamically created image in <img src= tag" title="" /> Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem in accessing dynamically created image in <img src=""> tag" Watch "Problem in accessing dynamically created image in <img src=""> tag" New topic
Author

Problem in accessing dynamically created image in <img src=""> tag

sunny choudhary
Greenhorn

Joined: Mar 04, 2009
Posts: 6
Hi,

I am using Tomcat5.5 and Struts2.
I am creating a image in my action class and i am storing it on my machine's disk giving the absolute path of the project.
After its success i am redirecting to the jsp page where in i want to display this image.
I am using <img src=""> tag in jsp to do this. In src attribute i am giving a relative path of the image to access.

Now the problem is - it is not taking the image from this relative path until and unless I refresh the folder structure in eclipse.
The image file exists on the disk but until i refresh the project from eclipse manually, the image is not getting displayed.

Is this a container (Tomcat) problem or something else?

Please provide me some solution on the same.


Thanks,
Sunny
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29249
    
139

Sunny,
What directory is the image in? Could it be in a "source" directory that Eclipse is copying elsewhere upon refresh?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
Don't get me started about those stupid light bulbs.
 
subject: Problem in accessing dynamically created image in <img src=""> tag
 
Similar Threads
<img> tag
Display images on jsp from server using absolute path
Relative path Issue
how to retrieve image in jsp page from a seperate folder.
display tag + image src.