Eelco,

Yeah, I can see that can be inconvenient.

Actually, it's a pretty good thing, on second thoughts. This way, you'll always know where to find your HTML file -- just look where its Java-equivalent is in the source package structure and that's where the HTML will be in the web structure... :-)

-- Gj

You must realize that, alltough Wicket gives you this possibility, the default packaged one is the default and thus is the easiest to use.

If you want it totally your way, it should be possible to provide your own lookup mechanisms. I haven't actually checked this, and do not know how difficult that is. Just know that Juergen and Chris said something about that option a long time ago.

Eelco


Geertjan Wielenga wrote:

Eelco Hillenius wrote:

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).



Aaaaaaaaaaah. Now it works... :-)

I didn't realize that the FULL PATH AS PACKAGES was needed.

So I had this:

   protected void init() {
String root = getWicketServlet().getServletContext().getRealPath("");
       getSettings().addResourceFolder(root);
   }

But I hadn't put the HTML files in the same package structure as used by the Java files.

This is slightly inconvenient (I prefer having all my HTML pages in the web folder -- on the same level as WEB-INF), but not too bad.

Thanks a lot for all your help and patience!

Geertjan


-------------------------------------------------------
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





-------------------------------------------------------
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




-------------------------------------------------------
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

Reply via email to