• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to define file paths in Tomcat 3.1

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy fellow ranchers,
The question I have relates to including GIFs inside of JSPs. When I am testing the JSPs using localhost:8080 the GIFs are found and displayed just fine.
But when I attempt to use my JSPs from outside my localhost the JSPs still work but the GIFs are missing.
I setup an image directory in directory which contains the JSP. and used "/image/test.gif" but JSPs still cannot locate the gif.
It displays the gifs just fine if I define the entire path (i.e. C:\jsp\images\test.gif) but I don't like the idea of having hardcoded paths in my JSP code

Any suggestions..??

------------------
Regards,
Travis M. Gibson, SCJP
Java Developer
www.travismgibson.com
travis@travismgibson.com
 
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

generally I have seen that the images can be displayed when
you use image/test.gif. I don't think you should use /image/test.gif. However, you shouldn't put them under WEB-INF
though!
So the dir structure would be:


My two cents.
regds.
- satya
 
reply
    Bookmark Topic Watch Topic
  • New Topic