I would like static content updates to be reflected in my web app without restarting web server. I am using Gradle with Jetty plugin.
How can I do that?
Here is my gradle.build file:
...
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'jetty'
...
dependencies {
compile 'org.glassfish.jersey.containers:jersey-container-servlet:2.14'
testCompile 'org.testng:testng:5.14.2'
}
Here is part of my web.xml for static content:
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.jpg</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.png</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.css</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>*.js</url-pattern>
</servlet-mapping>
Aucun commentaire:
Enregistrer un commentaire