Reputation: 111
I want to learn how session management is being done in Spring web MVC. Do you know any free tutorial on how is it being done?
I am thinking of similar sample applicatin such as BookStore or Shopping cart applications that I have done using basic servlets and JSP.
Kindly advise me how is it done and make it done the proper way in Spring Framework.
Thanks to all.
Upvotes: 11
Views: 11069
Reputation: 7021
You might take a look at Spring Security: http://static.springsource.org/spring-security/site/
Upvotes: 1
Reputation: 31
Use this filters to your purpose. Just extend the below mentioned HiddenHttpMethodFilter and write your own filter.
This class will be called for each request as pattern is given as /* . In this class redirect it to your logout controller.
<filter>
<filter-name>httpMethodFilter</filter-name>
<filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>httpMethodFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Upvotes: 3