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