Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
    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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

TOMCAT - Where to put GIFs for HTML Pages ?

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
My Tomcat is installed at c:\jak-tomcat
I copy the Servlet classes ( e.g. Serv01.class ) to
c:\jak-tomcat\webapps\ROOT\WEB-INF\classes
I access the Servlet using
http://localhost:8080/servlet/Serv01
I am able access static HTML pages (e.g. main.html) using
http://localhost:8080/main.html
My question is, in the HTML that the Servlet (Serv01) generates, if I want to include a GIF file ( pic01.gif ) as part of a IMG tag could someone please tell me how to code the path for SRC parameter ?. I am looking for
<IMG SRC ='What goes here'>
Thanks.
 
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
This is more appropriate to the HTML forum. I will move it there.

------------------
Matthew Phillips
Sun Certified Programmer for Java 2 Platform
 
Sheriff
Posts: 16930
285
Mac Android IntelliJ IDE Eclipse IDE Spring Debian Java Ubuntu Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
John,
Try putting your gifs in a directory under the one where your main.html is. Call that directory "images"
The IMG SRC would then be "/images/pic1.gif" or if that doesn't work try just "images/pic1.gif"
HTH
Junilu
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I'm closing this thread because it has been answered in more detail in the Servlets forum.
 
Where does a nanny get ground to air missles? Protect this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
    Bookmark Topic Watch Topic
  • New Topic