Can you try <html:img src="/WEB-INF/images/orange-ball.gif"/>
Maya

Tom Miller wrote:

> Hello all,
>
> It seems that the html:img tag is able to find images in the context
> root, but not in subdirectories.
> When I specify an image with the html:img tag like this:
> <html:img src="green-ball.gif"/>
> the images appear.
>
> But when I specify a subdirectory like this:
> <html:img src="WEB-INF/images/orange-ball.gif"/>
> the images are missing when the page renders, i.e. little red X symbol
> in the browser.
>
> Here is a pared down JSP that illustrates the problem. It gives the same
> results whether I include the <html:base/> tag or not.
>
> I'm using Struts 1.0b1 and Tomcat 3.2.1.
>
> TIA for any help.
>
> Tom
> --------------------------------------------------------------------------
>
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
>
> <html:html>
>    <html:base/>
> <head>
> </head>
>
> <body>
>    Dot One<html:img src="green-ball.gif"/>   <% /* image shows in
> browser */ %>
>    <p>
>    Dot Two<html:img src="WEB-INF/images/orange-ball.gif"/> <% /* image
> missing in browser */ %>
>
> </body>
> </html:html>
> --------------------------------------------------------------------------
>
> Tom Miller
> Miller Associates, Inc.
> [EMAIL PROTECTED]
> 641.469.3535 Phone
> 413.581.6326 FAX

Reply via email to