OK, I tried "/style.css" but it didn't work : style is apply but error page
is called (maybe for images used in style.css?)

So, I try to implement the other solution.
I found example on the wiki (
https://cwiki.apache.org/WICKET/including-css-resources.html). I try with
<wicket:head>
  <wicket:link>
    <link rel="stylesheet" type="text/css" href="style.css"/>
  </wicket:link>
</wicket:head>
on basePage.html, but style is not apply and error page still called.

so I try the other solution : I remove <wicket:head> block and I add

        add(CSSPackageResource.getHeaderContribution(BasePageVisiteur.class,
"style.css"));

in BasePage.java constructor, but style is not apply, error page still
called, and there is this warning message in Eclipse console :
WARN  - PackageResource            - Unable to find package resource [path =
fr/statlife/protoE4N/style.css, style = null, locale = null]

So I do not the right thing, and I am pretty lost... I'm sorry cause it's
certainly very simple to do that. I don't understand what am I doing wrong.


2011/5/20 Martin Grigorov <[email protected]>

> On Fri, May 20, 2011 at 11:48 AM, Mathilde Pellerin <
> [email protected]> wrote:
>
> > it was in the webapp folder, so I put it in the WEB-INF folder and I put
> > images folder in the WEB-INF folder to, put the error page is still
> called.
> >
> > I don't understand what happen cause css styles are visibly there in base
> > page and in extends pages.
> >
> > this is my basePage head :
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> > <link rel="stylesheet" href="styles.css" type="text/css" />
> > <title>Prototype E4N</title>
> > </head>
> >
> > and my extends pages head:
> > <head>
> > <title>Prototype E4N</title>
> > </head>
> >
> > Put
> > <link rel="stylesheet" href="styles.css" type="text/css" />
> >
> > in all extends pages head doesn't change anything.
> >
> > maybe I have to use instead...
> > <wicket:link><link .../></wicket:link>
> > should these tag be use in all pages or only on basepage?
> >
> > Only in the base page.
> All inherited pages should use <wicket:head> if they want to donate to the
> header.
> Change the url to href="/styles.css". This way it will work. But this is
> application specific and depends on the filter path you use in your
> web.xml.
> If you want to make it independent then you should put the .css file next
> to
> MyPage.html and use Wicket's ResourceReference to put it in the header.
>
>

Reply via email to