Hi Mike,

Use relative address for images in your CSS. That's a quick way. 

The other way I can think of is to use redirect in web.xml of your webapp in 
such a way that all request to /image/* goes to context/image/*

Hope it helps.

Regards,
D


----- Original Message ----
From: Mike Quilleash  <[EMAIL PROTECTED]>
To: Tomcat Users List <users@tomcat.apache.org>
Sent: Tuesday, March 27, 2007 9:21:38 AM
Subject: Paths in CSS files

Hi all,
 
I have a question about accessing resources from within CSS files,
images mainly.  Take the following CSS snippet.
 
.bt {
 background:url(/image/box.png) no-repeat 100% 0;
 margin:0 0 0 18px;
 height:17px;
 }

Particularly the url "/image/box.png".  Potentially my Tomcat web
application may be run with a context path so "/image/" becomes
"/contextpath/image" and all the CSS breaks.  Is there a way round this?
Or should I be placing the urls somewhere else?
 
Thanks.
 
Mike.
 

 This e-mail is bound by the terms and conditions described at 
http://www.subexazure.com/mail-disclaimer.html






 
____________________________________________________________________________________
Get your own web address.  
Have a HUGE year through Yahoo! Small Business.
http://smallbusiness.yahoo.com/domains/?p=BESTDEAL

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to