Wednesday, February 6, 2013

css/js files are locked if running in jetty

css/js files are not allowed to edit if running in maven jetty plugin, so it is very troublesome to restart jetty if need to edit css/js files.


  • why
refer to http://docs.codehaus.org/display/JETTY/Files+locked+on+Windows
  • solution
need to change useFileMappedBuffer to false in webdefault.xml


<param-name>useFileMappedBuffer</param-name>
<param-value>true</param-value> <!-- change to false -->

if you are using maven jetty plugin in eclipse, how to find the file webdefault.xml

refer to http://wiki.eclipse.org/Jetty/Feature/Jetty_Maven_Plugin

for the plugin, the file webdefault.xml in jar file jetty-webapp.jar

so go to %user%\.m2\repository\org\eclipse\jetty\jetty-webapp\{jetty version}\jetty-webapp-{jetty version}.jar

open org/mortbay/jetty/webapp/webdefault.xml and change the configuration mentioned above

No comments:

Post a Comment