Accepted answer

after the previous comments i was able to identify the root cause of this issue. while this is a bit specific to our use case, i share this with the community nonetheless.

this is basically caused by the timestamps of the files. my work directory is an nfs mount of another server. for some strange reason* the clock on that server is delayed. this means that if it's 9:00 and i change the jsp file, the file will be timestamped with 8:40.

there might have been a change in jetty from 6 to 8 regarding the strategy used for jsp file reloading - while jetty 6 does not seem to care about the file's timestamp and refreshes anyway, jetty 8 is more sensitive and does not reload the file.

so the "solution" here was simply to update the remote nfs server's clock.

*meaning the ntp deamon is running, i can ping the ntp servers, other machines on the same networks have the same ntp settings and yet this machine is still having its clock drift


mmalmeida, i've tested this scenario using the standard jetty-test-webapp. i put a jsp in src/main/webapp/jsp that forwards to another jsp in src/main/webapp/web-inf. starting the jetty maven plugin with mvn jetty:run, the forward happens correctly. if i leave the plugin running and modify the jsp in web-inf, and do a shift-reload on the browser, it picks up the changed page as expected.

note that you do not need to declare scantargets or anything else of that nature. the above behaviour (jsp reload) is a function of the jsp engine, which when running in development mode will check the timestamps on jsp files as it receives requests, and recompile on the fly as necessary.

i think you'll have to provide more details about your specific webapp - in particular how your setup is different to the test scenario i just described - in order to get any further with this.

regards jan


there have been a host of improvements to the plugin since jetty-6 days to run a variety of different project configurations. take a look at the documentation page for the plugin, choose the scenario that best meets you needs and adapt the configuration as needed. i suspect your case is under 'running an unassembled webapp'.

i'll note that for jetty-9 we are finally bringing the plugin over to eclipse so it can live with the project which will change the groupid to org.eclipse.jetty, the jetty-maven-plugin for 9.0.0.m2 will be in central early next week (documentation to be updated for that as well still)


Related Query

More Query from same tag