This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Wicket] Changes of html-files are not directly available - need to re-deploy

 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wicket allows you to switch between deployment and development setting.
This setting goes in web.xml file.
Maybe you have to check it.
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the development mode. But as I said: on one machine it's working, on the other one not.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't go through Wicket internals (I liked it in the past but not now :p)
May I suggest to check Wicket JIRA to see if it an issue or something? what about Wicket mailing list?
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There was indeed something on the mailinglist 2,5 years ago where the SLF4J dependency was not provided in the correct version (http://markmail.org/message/fqpioxh7dir67ttj#query:wicket%20html%20refresh+page:1+mid:ca74uawyqzjyj5v5+state:results), but I also checked that (without any positive results).
In JIRA I couldn't find any related problem. I guess I will give it tonight a try again, digging in Wickets internals and then ask on the mailing-list if I cannot find anything out.
Thanks again for your support.
 
Hauke Ingmar Schmidt
Rancher
Posts: 436
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Joachim Rohde
Ranch Hand
Posts: 433
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic