How to read session-timout from web.xml

后端 未结 2 666
别那么骄傲
别那么骄傲 2021-01-13 07:21

How can i read the session-timeout from the web.xml file?

Tried

getServletContext().getAttribute(\"session-timeout\").toString(); 
         


        
2条回答
  •  春和景丽
    2021-01-13 08:03

    It should be

       session.getMaxInactiveInterval();
    

    It will return time in seconds.

提交回复
热议问题