This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have here a little bug which is completly weird in my opinion.
Usually when you are changing a html-file, you just need to save it and it is directly available in the browser after a refresh. But this behaviour is not working in my environment. I always have to deploy the complete project which is quite painful especially for minor changes. It is not a problem of my project. I verified this by trying the exactly same project and also the quickstart from the official Wicket site on a different machine where it works as expected. So it must be somewhere in my configuration but I cannot figured it out where / what / why.
Machine one, where it is not working runs on Ubuntu 9.10, IDE is Netbeans 6.8 with Maven 2.2.1, server is a Tomcat 6.0.24 (also tried Tomcat 6.0.18).
Machine two, where it is working runs on Windows XP, IDE is Netbeans 6.7.1 with Maven 2.2.1, server is a Tomcat 6.0.18.
Anyone else encountered this problem? And even if not, I'm also open for blue shots what I might try because I have no clue what might cause this behaviour.
This list shows how you can configure your application in order of priority:
1 Through a system property
2 Through a servlet/filter-initialization parameter
3 Through a context-initialization parameter
And of course you can change your setting programmatically in your WebApplication.
I would like to help you more but if your modifications don't get picked, it means you are running the deployment mode.
In my web.xml I have:
and when my application starts it says in the output:
And I definitely do not set the deployment-mode programmatically.
I also tried, as mentioned earlier, to use the maven archetype of the official page:
The quickstart project also produces the above mentioned output, that Wicket is running in development mode.
On the Windows-system a refresh is sufficient, on the Ubuntu-System I need to re-deploy (my own project and also the quickstart project). I also tried already to start Netbeans as root-user on the Linux-system, just in case some access rights on my file-system are not sufficient. Without any change in the result.
This is really driving me nuts. Do you know by any chance where the reload within Wicket should take place? So that I might go through this part within the debugger to see what might goes on there.
Anyway thanks for your help already, it is really appreciated.
Tried it with Ubuntu 9.10 64 bit. Created a quickstart, both with mvn jetty:run and mvn tomcat:run changes to the HTML (within the target folder, of course, no IDE involved) are visible at once.
You could check if it is a cache problem by using JMX. You could do a resource checking for every request with a custom request cycle and possibly an own modification watcher (needed in environments where no threads are allowed, i.e. GAE). That would just cover the original problem, but ask for it if you want to try.
I found out what was wrong. Quite a rookie mistake: I relied on my IDE. As I mentioned I am using Netbeans where I have installed the Wicket plugin (http://plugins.netbeans.org/PluginPortal/faces/PluginDetailPage.jsp?pluginid=3586). It was the plugin which was copying the HTML files to the correct (server) folder after saving changes. And this behaviour is broken in Netbeans 6.8. In Netbeans 6.7.1 the plugin is working perfectly. I guess I didn't realize that the plugin is not compatible with NB 6.8 because on one hand the rest of the plugin seems to work perfectly (at least the parts that I am using) and on the other hand I was working the last weeks more on the backend so that I didn't realize after the upgrade of Netbeans that not everything was working as expected. For now I'm using Netbeans 6.7.1 again.
Thanks for the help.