A java servlet usefull for dev ONLY :
- serve static file
- notify change to client via LiveReload protocol (over socket)
The default port is not 35729 (like define in the LiveReload protocol). Instead, it uses whatever port your personal webapp uses. If you change the port then you could not use the Browsers Extension for LiveReload, but it should works if you insert a JavaScript snippet in your pages.
This is an example WebApp web.xml that configures LiveReload to watch /src/main/webapp for changes.
<display-name>Your Web Application</display-name>
<description>Your Apps description</description>
<servlet>
<servlet-name>LiveReloadJSServlet</servlet-name>
<servlet-class>co.tyec.livereloadservlet.LiveReloadJSServlet</servlet-class>
</servlet>
<servlet>
<servlet-name>LiveReloadWebSocketServlet</servlet-name>
<servlet-class>co.tyec.livereloadservlet.LiveReloadWebSocketServlet</servlet-class>
<init-param>
<param-name>watchDir</param-name>
<param-value>src/main/webapp/</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>LiveReloadJSServlet</servlet-name>
<url-pattern>/livereload.js</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LiveReloadWebSocketServlet</servlet-name>
<url-pattern>/livereload</url-pattern>
</servlet-mapping>
</web-app>
- Browsers Extension
- livereload-js the client side
- LiveReload Protocol
- LiveReload-JVM This project was start with the LiveReload-JVM as the base. It used an embedded standalone jetty webserver instead of integrating with your own webserver.
- LiveReload 2/3 the main tool (Mac & Windows only) include GUI
- guard-livereload a LiveReload server-side for Guard (Ruby)
- grunt-reload a LiveReload server-side for Grunt (javascript/nodejs)
- LivePage an other way to "auto-reload"
- without LiveReload :
cd web/root/path && python -m http.server 8000
(python)
- the project is under unlicense
- the project (source and binaries) include [livereload.js], livereload.js is under MIT. livereload.js HAS BEEN SLIGHTLY MODIFIED