Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to dispatch request to "j_spring_security_check" from controller

Through login.jsp I needed some value, so I forwarded request to controller after this I want to dispatch to default j_spring_security_check from controller.

How do I do that ?

like image 808
Sachin J Avatar asked Nov 22 '11 05:11

Sachin J


1 Answers

Since /j_spring_security_check is handled in a filter you'll need to add an extra bit to your Spring Security filter mapping, for example:

<filter-mapping>
    <filter-name>springSecurityFilterChain</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>FORWARD</dispatcher>
</filter-mapping>

<dispatcher>FORWARD</dispatcher> will allow you to forward the request from your controller.

like image 87
sourcedelica Avatar answered Oct 07 '22 19:10

sourcedelica