[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    RE: problem with showing an image
From:       D-Fuse <mr_dfuse () yahoo ! com>
Date:       2003-05-31 17:39:52
[Download RAW message or body]

Thanks, it worked with using the getContextPath().
Other people suggested just using the path relative
from my webapp, but that is what I tried first, and
Tomcat would always replace my url with:
controller_files/shadowlogo.html. Whatever I put into
the <img src =" ">, Tomcat cut off the extension,
appended .html and put controller_files in front of
it. (all my requests go through a Servlet named
Controller)



set this thing to
<img align="left"
src="<%= request.getContextPath()
%>/images/shadowlogo.jpg" 
alt="forumlogo">

Thanks 
guru


-----Original Message-----
From: D-Fuse [mailto:mr_dfuse@yahoo.com]
Sent: 31 May 2003 18:07
To: tomcat-user@jakarta.apache.org
Subject: problem with showing an image


Hey, I load the url of an image from a properties file
in a jsp. The image doesn't show in my browser
(phoenix), when I look at the source code the image
url points to the right direction. When I save the
source code as a static html and open it in phoenix
(using file://) the image shows up. Now when I put the
same static html file in my webapp dir, and look the
at the page using http://localhost... the image
doesn't show up. (there isn't even a placeholder or
some indication that the image wasn't found)
This is the html code generated by my jsp:
<img align="left"
src="/opt/tomcat/webapps/shadowbb/images/shadowlogo.jpg"
alt="forumlogo">
Does Tomcat handle serving images differently or am I
doing something else wrong?

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic