简体   繁体   中英

Login page session timeout issue in JSP

How can we make login page sessionless ? I have tried using <%@page session="false" %> but it doesn't work if I open a login page and try using page after timeout (specified in web.xml) it won't login because my handshake encryption key stored in session is not available now and session is already invalidated.

How can we tell server not to create session for login page ? I am also using Spring security in my application if that can help.

Make change in web.xml and set session-timeout to -1 .

<session-config>
      <session-timeout>-1</session-timeout>
</session-config>

Now it will never expire.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM