Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Code change reloading in Wicket

I've started to work with Wicket. When I make changes to the HTML templates, that becomes visible right away.

But when I make changes to the code, I need to restart Jetty. I'm running in DEVELOPMENT mode (at least that's what the big fat warning in the log says) and I have installed the ReloadingWicketFilter as per this question: Wicket - runtime class reloading

My guess is that this behavior is because I make all changes in the constructor of my pages and Wicket doesn't create a new page when I reload.

I've browsed the Wicket examples but there is no example which shows how to build a Wicket page without adding all components in the constructor or how to tell Wicket to create a new page for every request or how to tell Wicket to create a new Page.

like image 406
Aaron Digulla Avatar asked Aug 23 '26 14:08

Aaron Digulla


1 Answers

I am using mvn jetty:run and this config in the pom.xml:

 <plugin>
            <groupId>org.mortbay.jetty</groupId>
            <artifactId>maven-jetty-plugin</artifactId>
            <version>${jetty.version}</version>
            <configuration>
                <!-- to be used in combination with netbeans compile on save feature -->
                <scanTargets>
                    <scanTarget>target/classes/</scanTarget>
                </scanTargets>
                <scanIntervalSeconds>1</scanIntervalSeconds>
            </configuration>
 </plugin>

And my IDE (NetBeans) is configured that it compiles on save... then I can make a change switch to the browser and hit reload ... and the changes were applied + jetty was reloaded

Or use the commercial app jrebel

like image 150
Karussell Avatar answered Aug 27 '26 01:08

Karussell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!