Just put /style.css

Otherwise wicket is trying to guess the relative url. In most cases it
guesses wrong so I have adopted the practice of using resource urls
relative to the root of the domain.

**
Martin

2009/11/23 Ilya German <ilja.germ...@parex.lv>:
> Hello!
>
> I'm trying to make my web application to use a .css stylesheet. As far as I 
> understood reading
> http://cwiki.apache.org/WICKET/including-css-resources.html
> and
> Wicket in Action book
> I should be able to make any html page to work in the following configuration:
> say, Base.html includes:
> <head>
>   <link rel="stylesheet" type="text/css" href="style.css"/>
> </head>
>
> and to put the css file into "web app directory (root of your war file)".
>
> So the deployed project structure (say, in tomcat) would be like this:
>
> <tomcat webapps>/myapp
> --------------------------------------/META-INF
> --------------------------------------/WEB-INF
> ----------------------------------------------------/classes
> ----------------------------------------------------------------/pages
> -------------------------------------------------------------------------/Base.html
> -------------------------------------------------------------------------/Base.java
> -------------------------------------------------------------------------/Page1.html
> -------------------------------------------------------------------------/Page1.java
>  -> extends Base
> --------------------------------------/style.css
>
> However, when I access my Page1 page in browser (which extends Base page both 
> in java and html and seems to be working), I see, that the URL to css is 
> rewritten to ../style.css, which tries to reach style.css directly in <tomcat 
> webapps> and doesn't find it there.
>
> Could anyone explain me what am I doing wrong?
>
> Thanks in advance,
> Ilya

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to