Bah… 3 hours worth of debugging and finally figured out what was going on with this issue in Wicket and wnated to share this with any other developers out there that might be running into this.
Issue
I typically create a /resources directory under the root of any web app I’m working on where I places CSS, JavaScript and Images. Unfortunately it seems that in Wicket (a great framework BTW) the word “resources” is reserved… or special… or something.
Basically every time I tried to reference my CSS from my HTML using:
<link rel="stylesheet" type="text/css" href="resource/css/main.css" />
My app would startup, I would see in the log files the last line something along the lines of “Unable to find resource: main.css” and my CSS would never apply.
I was looking into header contributors and a whole myriad of other things I thought might be the issue.
Solution
I finally found this link with a message from Igor that made me think “hmm… maybe the ‘resources’ name is special?” so I changed my path to /resource (singular) and walla, CSS works fine now with all the exact same code I had.
Hopefully this tip saves someone else some time too.


23. May 2009 at 6:07 pm
Hi, I’m new to web developing and to Wicket. I want to do something similar to what you did creating a resource folder to store css and image files. Where should I create such folder in the file hierarchy?
I have been trying all day and I can’t get the html files to find the css file