kism3t
kism3t

Reputation: 1361

HotSwap Wicket HTML Files does not work in Intellij maven + tomcat

My HotSwap run configuration just works for java and not for html.

I am running a Wicket application on Tomcat, which I start with mvn tomcat7:run.

In my runner Configuration (Runner Tab VM Options) I entered:

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=61515

Here is the run configuration:

enter image description here

Also I created a Remote Starter

enter image description here

Now I start (not debug) Tomcat Local H2 and after that I start as debug the Tomcat Hotswap Run configuration.

When I change a java class it works after CTRL+SHIFT+F9, but when I change some html files it will not be rebuild.

Does anyone have a suggestion what I do wrong?

Upvotes: 2

Views: 367

Answers (1)

martin-g
martin-g

Reputation: 17533

You need to run Wicket in Development mode to update the HTML, otherwise Wicket caches the loaded markup on the first load and never checks again the file system.

If you are already running in DEV mode then make sure the updated HTML files end up in the classpath of your application, i.e. IDEA should copy them from your sources folder to the WEB-INF/classes/** folder when you make your module/project. Wicket will reload them from there if the modification time of an HTML is newer than the last time it was loaded.

Upvotes: 2

Related Questions