File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes TOMCAT - Where to put GIFs for HTML Pages ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply locked New topic

TOMCAT - Where to put GIFs for HTML Pages ?

John Thomas

Joined: Dec 19, 2001
Posts: 8
My Tomcat is installed at c:\jak-tomcat
I copy the Servlet classes ( e.g. Serv01.class ) to
I access the Servlet using
I am able access static HTML pages (e.g. main.html) using
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'>
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
This is more appropriate to the HTML forum. I will move it there.

Matthew Phillips
Sun Certified Programmer for Java 2 Platform

Matthew Phillips
Junilu Lacar

Joined: Feb 26, 2001
Posts: 6529

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"

Junilu - [How to Ask Questions] [How to Answer Questions]
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
I'm closing this thread because it has been answered in more detail in the Servlets forum.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
I agree. Here's the link:
subject: TOMCAT - Where to put GIFs for HTML Pages ?
It's not a secret anymore!