Answers for "java get session timeout from web.xml"

0

java session timeout

Setting session timeout globaly. It can be done by implementing ServletContextListener
@Override
public void contextInitialized(ServletContextEvent servletContextEvent) {      
    servletContextEvent.getServletContext().setSessionTimeout(timeinminutes);
}

For specific User we can get the session from Request (HttpServletRequest) 
e.g request.getSession().setMaxInactiveInterval(timeinsecond);
Posted by: Guest on September-28-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language