Ok. For the moment I'm handling it with a application init-param
appDir="/myRoot" that I append to every path as:
<img src="${appDir}/images/etc.gif"/>.

A bit crude, but it works. Feels a bit strange though that most of the
<c:xxx /> tags work relative the application while direct references in
the response works relative the server. It becomes a problem if you use
css "background-image:url(...);" in a separate style sheet too.

Thanks.


>The  JSTL <c:out> tag takes application-relative paths and converts
>to full  URL's,  if I'm not mistaken. I suppose you could also
>write your own  URL  rewriting  objects  or  routines,  but
>the URL's need to be converted before sent to the client at least.

>// Erik Hansson


>> Does image references always have to be relative the root of the web
>> server in jsp, or is there some way to make the reference be relative

>> the root of the web application instead? In this particular case,
>> Tomcat 5 is used.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".

Some relevant archives, FAQs and Forums on JSPs can be found at:

 http://java.sun.com/products/jsp
 http://archives.java.sun.com/jsp-interest.html
 http://forums.java.sun.com
 http://www.jspinsider.com

Reply via email to