Hi!

What's the preferred way of accessing e.g. images or other JSPs using
absolute pathnames in a JSP? If I use something like
<img src="/images/pic.gif"> this does not work if the webapp is not
deployed to the root context. There are some methods in ServletContext for
path handling, which should be used for constructing the right path?
I think it should look like that
<img src='<% magicthing("/images/pic.gif") %>'>

Does anybody know what the magicthing should be? At the moment I use
relative pathnames, but that gets complicated if you really have a lot of
JSPs, e.g. you need a lot of ../ if you have nested a lot of directories.

cu,
        boris
-- 
Dipl.-Inf. Boris Folgmann   mailto:[EMAIL PROTECTED]
Folgmann IT-Consulting      http://www.folgmann.de


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

Reply via email to