On 7/10/07, Juan Asensio Sánchez <[EMAIL PROTECTED]> wrote:

OK. I enabled debug and i found this line:

2007-07-11 00:11:39,970 DEBUG
[wicket.util.resource.locator.ResourceFinderResourceStreamLocator]
Attempting to locate resource

'es/bytelecom/bujero/web/themes/mollio/es/bytelecom/bujero/web/pages/common/css/main.css'
on path [folders =

[/media/datos/Java/Proyectos/Bujero-Web/build/web/WEB-INF/classes/es/bytelecom/bujero/web/themes/mollio]]
2007-07-11 00:11:39,970 DEBUG
[wicket.util.resource.locator.ClassLoaderResourceStreamLocator]
Attempting to locate resource

'es/bytelecom/bujero/web/themes/mollio/es/bytelecom/bujero/web/pages/common/css/main.css'
using classloader WebappClassLoader
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
[EMAIL PROTECTED]

Well, that file in that directory DOES NOT exist. So i used this in
the html template:

<link rel="stylesheet" type="text/css" href="css/main.css" media="screen"
/>

removing the line in the java file. Now i get this in the browser:

<link
href="/Bujero/test/resources/es.bytelecom.bujero.web.pages.common.BaseWebPage/css/main_es_ES.css"
rel="stylesheet" type="text/css" media="screen"/>

And this in the log:

2007-07-11 00:16:29,460 DEBUG [wicket.MarkupContainer] Rendering raw
markup
2007-07-11 00:16:29,460 DEBUG
[wicket.util.resource.locator.ResourceFinderResourceStreamLocator]
Attempting to locate resource
'es/bytelecom/bujero/web/pages/common/css/main_es_ES.css' on path
[folders =
[/media/datos/Java/Proyectos/Bujero-Web/build/web/WEB-INF/classes/es/bytelecom/bujero/web/themes/mollio]]
2007-07-11 00:16:29,460 DEBUG
[wicket.util.resource.locator.ResourceFinderResourceStreamLocator]
Attempting to locate resource
'es/bytelecom/bujero/web/pages/common/css/main_es_ES.css' on path
[folders =
[/media/datos/Java/Proyectos/Bujero-Web/build/web/WEB-INF/classes/es/bytelecom/bujero/web/themes/mollio]]
2007-07-11 00:16:29,460 DEBUG
[wicket.util.resource.locator.ResourceFinderResourceStreamLocator]
Attempting to locate resource
'es/bytelecom/bujero/web/pages/common/css/main_es.css' on path
[folders =
[/media/datos/Java/Proyectos/Bujero-Web/build/web/WEB-INF/classes/es/bytelecom/bujero/web/themes/mollio]]
2007-07-11 00:16:29,460 DEBUG
[wicket.util.resource.locator.ResourceFinderResourceStreamLocator]
Attempting to locate resource
'es/bytelecom/bujero/web/pages/common/css/main.css' on path [folders =

[/media/datos/Java/Proyectos/Bujero-Web/build/web/WEB-INF/classes/es/bytelecom/bujero/web/themes/mollio]]
2007-07-11 00:16:29,462 DEBUG [wicket.MarkupContainer] Add _autolink_1
to [MarkupContainer [Component id = _link_0, page =
es.bytelecom.bujero.web.pages.Home, path =
1:<auto>_header:<auto>_header:_link_0.WicketLinkResolver$1, isVisible
= true, isVersioned = true]]
2007-07-11 00:16:29,462 DEBUG [wicket.Component] Begin render
[MarkupContainer [Component id = _autolink_1, page =
es.bytelecom.bujero.web.pages.Home, path =

1:<auto>_header:<auto>_header:_link_0:_autolink_1.AutoLinkResolver$ResourceReferenceAutolink,
isVisible = true, isVersioned = true]]
2007-07-11 00:16:29,462 DEBUG [wicket.Page] Rendered [MarkupContainer
[Component id = _autolink_1, page =
es.bytelecom.bujero.web.pages.Home, path =

1:<auto>_header:<auto>_header:_link_0:_autolink_1.AutoLinkResolver$ResourceReferenceAutolink,
isVisible = true, isVersioned = true]]
2007-07-11 00:16:29,462 DEBUG [wicket.Component] End render
[MarkupContainer [Component id = _autolink_1, page =
es.bytelecom.bujero.web.pages.Home, path =

1:<auto>_header:<auto>_header:_link_0:_autolink_1.AutoLinkResolver$ResourceReferenceAutolink,
isVisible = true, isVersioned = true]]
2007-07-11 00:16:29,462 DEBUG
[wicket.markup.resolver.AutoLinkResolver] Added autolink
[MarkupContainer [Component id = _autolink_1, page =
es.bytelecom.bujero.web.pages.Home, path =

1:<auto>_header:<auto>_header:_link_0:_autolink_1.AutoLinkResolver$ResourceReferenceAutolink,
isVisible = true, isVersioned = true]]
2007-07-11 00:16:29,463 DEBUG [wicket.MarkupContainer] Rendering raw
markup

The file es/bytelecom/bujero/web/pages/common/css/main.css in the
directory
/media/datos/Java/Proyectos/Bujero-Web/build/web/WEB-INF/classes/es/bytelecom/bujero/web/themes/mollio
DOES exist. In the log i don't see any error. But i type the previous
URL in the browser i get a 404 error and the page does not load the
file.

I am going crazy. Thanks again.


like i said, set a breakpoint and walk it to see exactly where it doesnt
find it. that will give you the reason.

-igor




2007/7/11, Igor Vaynberg <[EMAIL PROTECTED]>:
> On 7/10/07, Juan Asensio Sánchez <[EMAIL PROTECTED]> wrote:
> > Well i had an error in my previous mail. Actually i am using this code
> > (i am developing a theme engine), so i use this code in the html
> > template:
> >
> > <link wicket:id="CSSMain" rel="stylesheet" type="text/css"
> > href="css/main.css" media="screen" />
> >
> > And this in the associated webpage:
> >
> > add(new StyleSheetReference("CSSMain", getClass(), "css/main.css"));
> >
> > So, the generated code is this:
> >
> > <link
>
href="/Bujero/test/resources/es.bytelecom.bujero.web.themes.mollio.es.bytelecom.bujero.web.pages.common.BaseWebPage/css/main.css"
> > rel="stylesheet" type="text/css" media="screen"/>
> >
> > That long package name is correct (it includes the theme package name,
> > es.bytelecom.web.themes.mollio, and the name of the page being
> > rendered,
> es.bytelecom.bujero.web.pages.common.BaseWebPage), the file
> >
>
WEB-INF/classes/es/bytelecom/bujero/web/themes/mollio/es/bytelecom/bujero/web/pages/common/css/main.css
> > DOES exist, but the file is not loaded and if i type that URL in the
> > browser i get a 404 error.
> >
> > Any idea? THanks again.
>
> set a breakpoint in the wicket filter and see exactly where it doesnt
find
> the file. one thing i would watch out for is the getClass() call as it
> changes when you subclass, better do BaseWebPage.class instead
>
> -igor
>
>
> >
> > 2007/7/10, Igor Vaynberg < [EMAIL PROTECTED]>:
> > > On 7/10/07, Juan Asensio Sánchez <[EMAIL PROTECTED]> wrote:
> > >
> > > > Hi everybody
> > > >
> > > > I am trying to link a CSS file to my template using this code:
> > > >
> > > > <wicket:head>
> > > > <wicket:link>
> > > > <link rel="Stylesheet" type="text/css" href="css/main.css"
> media="screen"
> > > />
> > > > <wicket:link>
> > > > </wicket:head>
> > > >
> > > > Also tried with:
> > > >
> > > > <wicket:head>
> > > > <link wicket:id="CSSMain" rel="Stylesheet" type="text/css"
> > > > href="css/main.css" media="screen" />
> > > > </wicket:head>
> > > >
> > > > But in both cases i get this in the code of the response page:
> > > >
> > > > <link
> > >
>
href="/Bujero/test/resources/es.bytelecom.bujero.web.pages.common.BaseWebPage/css/main_es_ES.css"
> > > > rel="stylesheet" type="text/css" media="screen"/>
> > > >
> > > > That URL gets a 404 error. That long name is actually the package
and
> > > > the class where the css file is stored, that is not an error being
so
> > > > long.
> > > >
> > > > Also, 'es_ES' is added to the filename, how to remove?
> > > >
> > > > Thanks.
> > >
> > > so your main.css is under
> > >
> classes/es/bytelecom/bujero/web/pages/common/css/main.css ?
> > > from the looks of it thats where it should be.
> > >
> > > dont worry about es_ES in the name, since the url is pointing to a
> wicket
> > > resource instead of the file itself wicket will cascade search:
> > > main_es_ES.css, main_es.css, main.css and should find the last.
> > >
> > > -igor
> > >
> > >
> > >
> > > >
> > >
>
-------------------------------------------------------------------------
> > > > 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
> > > >
> > >
> > >
> > >
>
-------------------------------------------------------------------------
> > > 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
> > >
> > >
> >
> >
>
-------------------------------------------------------------------------
> > 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
> >
>
>
>
-------------------------------------------------------------------------
> 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
>
>

-------------------------------------------------------------------------
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

-------------------------------------------------------------------------
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