oi. the basic problem is that WEB-INF is inaccessible via direct urls. this is because it houses stuff like classes and you dont want the user to have access to those.
so there is a way to make it work, but it will involve wicket or another servlet streaming those static resources, which is a lot of overhead. my suggestion is to move all the css/js/foo out of WEB-INF -igor On 9/8/07, Jason Mihalick <[EMAIL PROTECTED]> wrote: > > > I've been searching the forums and wiki on this half the night and I just > can't figure out what I'm doing wrong here, so please bear with me if > there > is an obvious answer to this. > > Wicket is not finding my css or js resources when the application is > deployed. > > I followed the wiki instructions for Wicket 1.3 on how to "Control where > HTML files are loaded from" > ( > http://cwiki.apache.org/WICKET/control-where-html-files-are-loaded-from.html#ControlwhereHTMLfilesareloadedfrom-InWicket1.3 > ). > I have the following structure under WEB-INF: > > WEB-INF/ > +--- content/ > +--- css/ > +--- help/ > +--- img/ > +--- js/ > BasePage.html > Page1.html > Page2.html > etc. > web.xml > > In the init() method of my application class, I have added this code as > per > the wiki: > > IResourceSettings resourceSettings = this.getResourceSettings(); > resourceSettings.addResourceFolder( "WEB-INF/content" ); > resourceSettings.setResourceStreamLocator( new PathStripperLocator() > ); > > My implementation of the PathStripperLocator class matches that found on > the > wiki. > > When I view the source of Page1.html (which inherits from my BasePage) in > my > browser after wicket has served it, I see that Wicket is rewriting the > location of the css resources as follows: > > <link href="../css/styles.css" rel="stylesheet" type="text/css"/> > > I expected the href value to instead be "css/styles.css" (without the > "../"). > > What do I need to do here in order to make this work? > > Your help is greatly appreciated! > > -- > Jason > > > -- > View this message in context: > http://www.nabble.com/Locating-CSS-under-WEB-INF%2C-please-help-tf4408084.html#a12575952 > Sent from the Wicket - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
