I'm a bit behind on the discussion, but if you want to set (actually
add) another resource lookup path, that is easy. E.g. when I want to
load the HelloWorld example from WEB-INF of the web application, I do:
protected void init()
{
getSettings().addResourceFolder("WEB-INF");
}
in HelloWorldApplication, and put the templates (in this case just
HelloWorld.html) in WEB-INF + full path as packages (in this case
'WEB-INF/wicket/examples/helloworld).
WARNING *** WARNING *** WARNING ***
Do NOT try to use the any servlet context stuff (like addResourceFolder
potentially does when it tries to resolve to a valid path) in the
constructor of your application. You HAVE to do this in init(), which is
exactly the same as how you would do it with Servlets. IF you try to do
it in your Application's constructor, and exception will be thrown like:
java.lang.IllegalStateException: wicketServlet is not set yet. Any code
in your Application object that uses the wicketServlet instance should
be put in the init() method instead of your constructor
at
wicket.protocol.http.WebApplication.getWicketServlet(WebApplication.java:116)
at
wicket.protocol.http.WebApplication$2.newResourceFinder(WebApplication.java:339)
at
wicket.ApplicationSettings.getResourceFinder(ApplicationSettings.java:635)
at
wicket.ApplicationSettings.addResourceFolder(ApplicationSettings.java:380)
at
wicket.examples.helloworld.HelloWorldApplication.<init>(HelloWorldApplication.java:35)
And your webapplication will not be available at all.
Geertjan, maybe this was your problem, but you didn't notice the log?
Regards,
Eelco
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user