Ok, I found it and it was my fault. I leave it here so that anyone experiencing this same problem can know:
The problem is, this applicacion I am developing was Struts-based before, and there was an "index.jsp" page in the root of the web application (which of course had rendered useless with wicket, but I forgot to delete it). When I did a request to the "/" of my webapp context, Tomcat noticed that no servlet applied to that URL, but that I had an index.jsp standing there which is the default "welcome file" name. I hadn't configured this in web.xml, but anyway that seems to be a standard name and a page with such a name will be considered welcome file even if not explicitly configured in web.xml. When this happened, Tomcat automatically set the "servlet path" (returned by request.getServletPath()) to "/index.jsp" instead of "/", which is what would happen if that file weren't there. And from then on, having "/index.jsp" as a servlet path, everything went wrong, as Wicket was not able to compute the paths for resources or CSS files correctly... Hope this helps someone. Regards, Daniel. dfernandez wrote: > > > Hello all, > > I am having problems with the path that Wicket builds for my CSS sheet. I > have a "BasePage" which has: > > add(HeaderContributor.forCss("css/styles.css")); > > And a sign-in page that extends this BasePage is mounted like this at the > Application "init()" method: > > mountBookmarkablePage("/aaa/signIn", SignInPage.class); > > The problem is, when I load this page I get a correct CSS path, like this: > > <link rel="stylesheet" type="text/css" href="../css/styles.css" /> > > And when I input incorrect data in the form, I get a message in my > feedback panel and I am redirected to the same page, but this time the URL > is not "/aaa/signIn", but "/?wicket:interface=:5::::". > > This time the page renders correctly, but there is no CSS! And that is > because, if I see the HTML, the <link> tag for this CSS sheet is: > > <link rel="stylesheet" type="text/css" href="../css/styles.css" /> > > Instead of what it should be: "css/styles.css" > > What can be happening here? > > In case this helps, I am applying the Wicket filter to "/*". > > Many thanks, > Daniel. > > -- View this message in context: http://www.nabble.com/Problem-with-bad-CSS-path-after-validation-tp15455620p15477313.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]