Created
March 15, 2017 05:16
-
-
Save stuartwdouglas/2643533b6850332054326f3fa76dcdbd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.servlet.ServletContextEvent; | |
import javax.servlet.ServletContextListener; | |
import javax.servlet.annotation.WebListener; | |
/** | |
* @author Stuart Douglas | |
*/ | |
@WebListener | |
public class SessionIDChangeListener implements ServletContextListener { | |
@Override | |
public void contextInitialized(ServletContextEvent sce) { | |
sce.getServletContext().getSessionCookieConfig().setName("MYSESSIONID"); | |
} | |
@Override | |
public void contextDestroyed(ServletContextEvent sce) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment