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");
You can find this code and some other best practices in my company's source
repo here:
<http://opensource.55minutes.com/svn/java/trunk/fiftyfive-wicket/fiftyfive-wicket-core/src/main/java/fiftyfive/wicket/FoundationApplication.java>
--
Matt
On Jul 13, 2011, at 8:32 AM, Andrew Todd wrote:
> Hello,
>
> I'm investigating writing a new project in Wicket and am playing
> around with a project created from the 1.5-RC5.1 quickstart maven
> archetype.
>
> Using 'mvn jetty:run' from the command-line, none of the changes I
> make to source files, either Java or HTML, are picked up unless I
> restart the server.
>
> Using the instructions here:
> https://cwiki.apache.org/WICKET/maven-jetty-plugin.html
>
> I can attach to the Jetty instance from Eclipse, and changes to Java
> files, but not HTML files, are picked up on the server.
>
> However, "development mode" promises automatic reloading of source
> files. I need this to work without having to attach to an IDE in debug
> mode, and for HTML as well as Java. What am I missing?
>
>
> Thanks,
> Andrew
>
> ---------------------------------------------------------------------
> 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]