By default Jetty locks files with static content on Windows, so you cannot edit and reload them by just refreshing the browser hitting F5.
To overcome this, you have to change the init-parms of the default servlet. You can do this in the web.xml by setting the parameter useFileMappedBuffer to false.
Example :

web.xml
<?xml version= "1.0" encoding ="UTF-8"?>
<web-app xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
        xmlns= "http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
        id= "WebApp_ID" version ="3.0">
         <display-name>my-app</display-name >
         <servlet>
                <servlet-name>default</ servlet-name>
                <servlet-class>org.eclipse.jetty.servlet.DefaultServlet</servlet-class >
                <init-param>
                        <param-name>useFileMappedBuffer</param-name >
                        <param-value>false</ param-value>
                </init-param>
         </servlet>
</web-app>

Comments

comments powered by Disqus