Invalidating session in spring mvc

In this example, we will configure maximum inactive time for the users in our system.

invalidating session in spring mvc-31invalidating session in spring mvc-24

That’s mean a processing of forms, adding objects into a session, displaying of objects from the session on JSP. This Spring MVC Session tutorial will be based on one of the previous posts on my blog, related to the form handling.Notice that you don’t even need to do anything special in your spring configuration(xml or annotation based), shown below just for information: package com.websystique.springsecurity.configuration; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation. Configuration; import org.springframework.security.config.annotation.authentication.builders. Authentication Manager Builder; import org.springframework.security.config.builders. Http Security; import org.springframework.security.config.configuration. Enable Web Security; import org.springframework.security.config.configuration. Web Security Configurer Adapter; @Configuration @Enable Web Security public class Security Configuration extends Web Security Configurer Adapter Rest of application code is same as mentioned in every post in this series.To complete counters for handling time example, we also implement method, which is described in the next subsection.This method is implementation just to get information, how long it took to process the current request.

Leave a Reply