Just to clarify, the resource polling should allow you to see HTML changes (but note Martin's comment about this potentially being broken in 1.5RC1). It does not affect Java reloading.
For Java changes I believe this is not possible without an IDE or perhaps a commercial product like JRebel[1]. For Eclipse, the way I've seen it done is to create a class like the Start.java that comes with the quickstart, right click on that class, and choose Debug. This will launch a Jetty container inside Eclipse's debugger, which gives you auto-reloading of Java files. [1]: http://www.zeroturnaround.com/jrebel/ -- Matt On Jul 13, 2011, at 10:37 AM, Andrew Todd wrote: > On Wed, Jul 13, 2011 at 1:04 PM, Matt Brictson <[email protected]> wrote: >> The way I've always done it (and this works just fine outside of Eclipse as >> well), is to enable resource polling in Wicket for the directory that >> contains the HTML files. >> >> In the init() method of your WebApplication subclass (in the quickstart this >> is called WicketApplication.java) do something like this: >> >> getResourceSettings().setResourcePollFrequency(Duration.ONE_SECOND); >> String htmlDir = getServletContext().getRealPath("/"); >> if(htmlDir != null && !htmlDir.endsWith("/")) >> { >> htmlDir += "/"; >> } >> getResourceSettings().addResourceFolder(htmlDir + "../java"); >> getResourceSettings().addResourceFolder(htmlDir + "../resources"); > > Thanks for the link. I added this code to init() and confirmed that > the paths being added are the correct ones for my Maven project. > However, I'm still not seeing HTML changes being updated when I do a > 'mvn jetty:run.' (Or Java changes, for that matter). Resources in the > htmlDir that was already set, like CSS, are also not updating. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
