Hello all,
I have been using the Felix ExtHttpService to run my little webapp. For
Wicket to work I need to pass all requests for my webapp to the Wicket
filter class. I register the Wicket filter with
ExtHttpService service = (ExtHttpService) bc.getService(sRef);
Hashtable<String, String> props = new Hashtable<String, String>();
props.put("applicationClassName",
WebUIWicketApplication.class.getName());
props.put("filterMappingUrlPattern", "/ui/*");
try {
service.registerFilter(new WebUIWicketFilter(), "/ui/*", props, 0,
null);
} ....
Previously I was using the webserver root (as in http://localhost:8080/)
with filter set to "/*" and all was well. Then I wanted to move my UI to
"/ui/*" and add some different stuff under another URL. Now, Wicket fails to
load any CSS files. I guess this might be because it identifies CSS file
requests from URL's that start with "/resource" and now they start with
"/ui/resource". The process of programmatic registration of filters and
configuring all the parameters seems a bit hard to find documentation for,
so I am not sure what is wrong.
So, my question would be, how can I fix this to get the CSS files to load?
Am I even registering the filter correctly to use it under "/ui" or should I
do it somehow differently? Can I set the "content-root" attribute that is
normally in the web.xml file somehow with ExtHttpService and use that to get
a root of "/ui" while still using a filter of "/*"? Any other ideas?
Thanks,
Teemu