Preserve Jetty Session Across Server Reboots


 

Jetty is fast to start up.  But it does not preserve the http session when restarted.  To solve this problem, I modified the Jetty source code (3 java files):

org/mortbay/jetty/servlet/AbstractSessionManager.java
org/mortbay/jetty/servlet/ServletHttpRequest.java
org/mortbay/jetty/servlet/WebApplicationHandler.java

Now I can continue whatever I am doing even after Jetty is restarted :)

Here is the modified Jetty (5.1.12) jar.  It can be used with Jetty Launcher, standalone Jetty and Jetty through MyEclipse.

It is for development purpose only because Jetty session is saved in the directory "cachedsessions" after EVERY request!