Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

stroing and displaying images

 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanking you for giving replay
In what way i also tried but i am not getting image
 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Ramesh,

Try doing like this...

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

Hope this helps.

Regards,
Arul.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic