Thomas R. Corbin wrote:
> On Friday 01 June 2007 1:42 pm, Matej Knopp escreveu:
>> Look at what url is your stylesheet. The images withing stylesheet are
>> always located relatively to the stylesheet itself.
> 
>       so there's no way to make them relative to the context path/root?

If you don't care about it working behind a mod_proxy, you can just go:
url(/path/to/file.gif)

And that will obviously be relative to the root of your server's URLs, 
whatever that means.

If you want it to do the "right thing" behind mod_proxy, then you could 
write a special resource which parses your CSS file and rewrites the 
URLs appropriately, using Request#getRelativePathPrefixToContextRoot().

Not unreasonably, Wicket expects you to package your resources together. 
What's the point of putting your CSS in a package if the images it 
depends on are not? You may as well just put your CSS in your context 
alongside the images.

We provide support for either, but we don't really provide support for 
both simultaneously, as that's really bad practise, IMO. ;-)

Al

-- 
Alastair Maw
Wicket-biased blog at http://herebebeasties.com

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to