I have problem with Filters and j_security_check. 

I need to do some additional actions after authentication and I decided to use 
filter for j_security_check.

Here my filter code:

public class PostLoginFilter implements Filter {
  | 
  |     public void doFilter(ServletRequest servletRequest, ServletResponse 
servletResponse, FilterChain filterChain) throws IOException, ServletException {
  | 
  |         System.out.println(?Before j_security_check?);
  |         filterChain.doFilter(servletRequest, servletResponse);
  |         System.out.println(?After j_security_check?);               
  |         // My code here     
  |         ?.
  |     }
  |     ?
  | }

Web.xml

<filter>
  |         <description>This filter is executed after login</description>
  |         <filter-name>PostLoginFilter</filter-name>
  |         <filter-class>PostLoginFilter</filter-class>
  |     </filter>
  | 
  |   <filter-mapping>
  |         <filter-name>PostLoginFilter</filter-name>
  |         <url-pattern>/j_security_check</url-pattern>
  |     </filter-mapping>
  | 

Login page form:

<form name="loginForm" method="get" action="j_security_check
  | Username: <input type="text" name="j_username"/>
  | <br/>
  | Password: <input type="password" name="j_password">
  | <br/>
  | <input type="submit" name="btnSubmit" value="Sign In" />
  | </form>

But JBoss/Tomcat does not execute it.

I use JBoss 4.0.1SP1.

I also tried with Tomcat 5.5.7, the same problem.

Is it Tomcat bug???? 
Or Tomcat does not support filters on j_security_check???




View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3870337#3870337

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3870337


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
JBoss-Development@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to