Hi,
Sure this is a simple question, but I have an War File (ROOT.war),
which expands to the Root directory, and is available under
http://myserver.com/cart.jsp. Internally, the file was set up to have
images tags like <img src="/images/cash.jpg"....../>.
Anyway, I have to move where it lives. It is been installed into a
sub-directory, and I find that when I call
http://myserver.com/ShoppingCart/cart.jsp, I get an error because
/images/cash.jpg does not exist.
How should I set up the Context to allow me to use the cart.jsp, with
its /images/cash.jpg image tag without having to change them to
/ShoppingCart/images/cash.jsp? (Reason is there are hundreds of
references and it will change again once implemented into different
sites.)
Thanks in advance,
Alasdair
Rohit Kumbhar - 16 Aug 2006 14:18 GMT
> Hi,
>
[quoted text clipped - 10 lines]
> its /images/cash.jpg image tag without having to change them to
> /ShoppingCart/images/cash.jsp?
Add the <base> tag to the jsp with the url value as the contextRoot +
"ShoppingCart"
(Reason is there are hundreds of
> references and it will change again once implemented into different
> sites.)
Best way, deploy it as an application on its own!
> Thanks in advance,
>
> Alasdair