Hello,

I had exactly the same problem and found that gifs need to be referenced as
"/MyGif.gif".  This makes it look in the web root directory (i.e. where your
HTMLs and JSPs are).  If you have a sub-directory then it might become
"/images/MyGif.gif".  I messed around with this for ages trying the context
path and all sorts of other things including preceding dots etc. as in your
examples.  Also check the case of your gif file name because if you are
ftp'ing from Windows it could be putting them in in uppercase.

Regards,
Susan Hoddinott
http://www.hexworx.com

----- Original Message -----
From: "Mark Biciunas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 3:09 AM
Subject: images not appearing


> I am deploying a test servlet on Tomcat 4.1.24.  Everything works great,
the
> servlet executes, I get results back at my browser, but none of the images
> show up.
>
> In conf/server.xml, I have added the following:
>
>     <Context path="" docbase="helloworld" debug="99">
>         <Logger className="org.apache.catalina.logger.FileLogger"
>                       prefix="localhost_helloworld_log." suffix=".txt"
>                       timestamp="true"/>
>     </Context>
>
> In webapps/hello/WEB-INF/web.xml, I have the following:
>
>     <web-app>
>         ...
>         <servlet>
>             <servlet-name>helloworld</servlet-name>
>             <servlet-class>helloworld.Hello</servlet-class>
>         </servlet>
>
>         <servlet-mapping>
>             <servlet-name>helloworld</servlet-name>
>             <url-pattern>/</url-pattern>
>         </servlet-mapping>
>
>     </web-app>
>
>
> The image directory has been created in webapps/hello, and the requested
> image does exist.  As part of trying to resolve this, have placed copies
of
> the image directory up and down the directory tree and tried calling the
> image in the servlet in a number of ways (ie: /images/image.gif,
> ../images/image.gif, images/image.gif).  Nothing seems to work to get the
> image to display!!!
>
> Any and all ideas would be greatly appreciated at this point!!!
>
> Mark
> [EMAIL PROTECTED]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to