You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Babu, Bharathi" <bh...@twc.state.tx.us> on 2004/01/28 18:46:11 UTC
mapping Images
Environment: Struts 1.1, WebSphere 5.1.0, JDK 1.3
Our development environment is broken out so that each functional group is a
separate module, but since we are also using Tiles, all the pages share a
common layout JSP. Is there a way to map image (stylesheet, javascript,
etc..) files to a specific directory so that all the modules can use the
same layout JSP?
Currently, all our image tags look like:
<img src="<%=request.getContextPath()%>/images/logo.jpg" />
Is there a way we can map the "images" directory to a directory relative to
the webapp; so, that we don't have to type in "request.getContextPath()"
every time? I tried using the "html:img" tag, but the generated path is
always relative to the module. We need it relative to the root webapp.
Any help would be greatly appreciated!
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org