This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes stroing and displaying images Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "stroing and displaying images" Watch "stroing and displaying images" New topic
Author

stroing and displaying images

ramesh kothakonda
Ranch Hand

Joined: Feb 14, 2006
Posts: 40
Hi
java ranchers



we are doing the project in struts. I am getting problem with storing and displaying image



Actually my some jsp pages are available in
webapps/Hotels/web/webadmin/roomsmanager

But the images are available in (webapps/Hotels/img/images/roomsimages/)
in this directory.
In what way i can display particular image with img tag

if i write a code in test.jsp(available in roomsmanger directory)
<img src="img/images/roomismages/xx.jpg" /> i am not getting image


what i have to do for displaying images


thanking you
k.ramesh


The object oriented way of becoming "RICH" is by INHERITANCE<br />Whoever said money can't buy happiness, didn't know where to shop.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
If you are using the Struts tags, I would suggest using html:image. Your code would probably look something like this:

<html:img page="/img/images/roomismages/xx.jpg" />

- Brent
ramesh kothakonda
Ranch Hand

Joined: Feb 14, 2006
Posts: 40
thanking you for giving replay
In what way i also tried but i am not getting image
Arulanand Dayalan
Ranch Hand

Joined: Aug 10, 2005
Posts: 124
Hi Ramesh,

Try doing like this...

<img src="../../../img/images/roomismages/xx.jpg" />

Hope this helps.

Regards,
Arul.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: stroing and displaying images
 
Similar Threads
Sample Spring Web Flow Application
Image will not change on the Browser...Saving on the Tomcat Problem.....HELP...Please
images in WSAD
images in jsp in WSAD
how to install tomcat 5.5 in windows vista