public static void setHtmlHotDeploy ( final WebApplication application ) { application . getResourceSettings ( ) . setResourcePollFrequency ( Duration . ONE_SECOND ) ; final String slash = "/" ; String realPath = application . getServletContext ( ) . getRealPath ( slash ) ; if ( ( realPath != null ) && ! realPath . endsWith ( slash ) ) { realPath += slash ; } final String javaSourcePath = realPath + "../java" ; final String resourcesPath = realPath + "../resources" ; addResourceFinder ( application , javaSourcePath ) ; addResourceFinder ( application , resourcesPath ) ; }
Use this method to enable hot deploy of your html templates on development . Works only with jetty . Only for