Grizzly Server: Static resources locked when server running

When I was finished setting up my neatly configured environment (grizzly, jersey, filters, static resources, …) I got annoyed when I started to work on the frontend. When the Grizzly server was running and e.g. the index.html was called, then there seems to be a file lock on that file. This prevents me from making changes to it so that I would have to stop the server, save the file and start the server to make the changes visible. This is no fun when developing!

After several hours I found out what to do. I had to disable the FileCache which would initiate the file lock. If this still not helps than there might be a problem with the WebappContext, which is initialized with an empty (or “/”) context path. In my case this was the same path where my static resources were. So the first time I accessed my HTML-file it was locked. So in the end I ended up with something like that:

This entry was posted in Java, REST and tagged , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

− one = 8

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">