Reputation: 1607
I have a question related to context reloading. What I do:
start jetty
put war1.war in /webapps --> that fires a new /war1 context and it works.
put war2.war in /webapps --> that fires a new /war2 context and it works.
Suppose that I made some changes in development in war1.war. I want to upgrade war1.war in /webapps but Windows complains about this file being used.
I stop jetty
I put the new war1.war in/webapps --> all ok.
Question -> How to reload war1.war without shutting down jetty?
Upvotes: 1
Views: 1462
Reputation: 68308
I think you've run into the problem described at Files locked on Windows:
Jetty buffers static content for webapps such as html files, css files, images etc and uses memory mapped files to do this if the NIO connectors are being used. The problem is that on Windows, memory mapping a file causes the file to be locked, so that the file cannot be updated or replaced. This means that effectively you have to stop Jetty in order to update a file.
There are two solutions, both documented in the above link:
Upvotes: 3