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

Reply via email to