struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wendy Smoak <>
Subject RE: Pointing to resources within the struts app client side.
Date Tue, 18 Feb 2003 15:04:09 GMT
Simon wrote:
> I'm trying to place an image with my web page that is stored as a resource
> within my struts web-app.  I'm using xslt to create the output html, but
> can't work out how to point at the image correctly.  I had put
> src="/WEB-INF/classes/resources/graphics/icon.bmp", but this will not
> display iether the image or the alt description.  Anyone have a clue how I
> can do this?

Images are loaded by the browser in a separate request, they don't come down
the pipe with the HTML.  So you have to put those images in a place where a
normal browser request can find them, and that's going to be above WEB-INF.

Try making an 'images' directory off of the root of your webapp.  I'm not
sure why the alt text isn't appearing, though... can you post the JSP you're
using to generate the image tag and the resulting HTML?

Wendy Smoak
Applications Systems Analyst, Sr.
Arizona State University PA Information Resources Management

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message