tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From luckypig <>
Subject Re: Trouble displaying images
Date Wed, 11 Aug 2004 01:17:58 GMT
You'd better user relative path,you can use ContextPath+relative image path.

Xeth Waxman <> wrote:Hello: first time posting, and I am a complete
tomcat/servlet/java newbie, so please forgive me if I
ask a really stupid question. I have a servlet which
creates a web page, and included on the page is an
image. I can't figure out how to reference the image
via a relative path, so I am using an absolute path. 
The code looks like this:


The image displays fine under IE 6.0, but won't show
up in Mozilla/Netscpae/Firefox. Does anyone know why?
Also, if anyone knows the base path a servlet (not a
war, jar or an ear, since I don't know how to make
those and I can't get ant to install on my system
anyway; just a servlet dropped in
ROOT/WEB-INF/Classes) then I can make my paths
relative rather than absolute, which I would prefer.

Thanks again for any assistance, and for the service
those of you giving advice provide.

Xeth Waxman
Tucson, AZ

Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages! 

To unsubscribe, e-mail:
For additional commands, e-mail:

Do You Yahoo!?
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message