Can I update HTML files using Wicket and Eclipse without recompiling classes?

I use Eclipse and Maven-2, and I would like to be able to edit my HTML files without “this” (not sure if Eclipse or Maven) will recompile my application. I understand that usually Eclipse tries to hot swap new compiled Java classes with Eclipse and Tomcat.

Is it possible to use something like this?

getResourceSettings().setResourcePollFrequency(null);

I know that I can turn off automatic updates for Tomcat in Eclipse, but I would like the HTML file to be updated and the classes not to be updated if possible.

By the way, my main problem is that Tomcat tends to get Perm gen errors after I (hot) reload too many Java classes.

+3
source share
5 answers

You seem to be correct, you should use setResourcePollFrequency(Duration.ONE_SECOND);or the like. This link contains more detailed information . However, what I found is that due to Wicket caching, the internal cache containers seem to be really messed up after any hot swapping, so you just need to find out the hotkey to restart Tomcat or start developing Wicket using the built-in Jetty and WicketTester.

+1
source

You might want to consider expanding the permgen space when starting eclipse. There is a command line argument:

eclipse [normal arguments] -vmargs -XX:PermSize=64M -XX:MaxPermSize=128M

( : http://wiki.eclipse.org/FAQ_How_do_I_increase_the_permgen_size_available_to_Eclipse%3F

, HTML , , .

: null , Duration.MAXIMUM. , "Build Automatically" Project eclipse, , , .

, , :

http://www.wicketframework.org/faqs.html

, , .

+1

( : Project- > Build Automatically), , , .

Build Automatically , ( , ), ctrl-B, , , alt-P N .

+1

, ( ) Tomcat, Wicket Jetty onder/src/test/java/com/your/package/Start.java . Wicket , .

0

HTML jsp ?

Do you use tomcat? If you are editing only html files, go and change them as you wish. Until you place them somewhere else so that tomcat retrieves them, you will see updates (updates).

If it is jsp, save the new file, delete the files in the old working folder. This will make tomcat think about it the first time a file is requested, and it will recompile jsp on the fly.

0
source

Source: https://habr.com/ru/post/1718344/


All Articles