Filter and j_security_check with tomcat 5

hi all,

can anybody tell me that can we useFilter with j_security_check in tomcat 5, if yes then please tell me the procedure. I wana to use it but failed to do so. if you know any link or tutorial then please tell me.

thanks in advance,

here is code of my project..(web.xml)

<filter>

<filter-name>loginFilter</filter-name>

<filter-class>com.xyz.web.filter.LoginFilter</filter-class>

<init-param>

<param-name>login-error-page</param-name>

<param-value>/loginError.do</param-value>

</init-param>

<init-param>

<param-name>default-page</param-name>

<param-value>/private/modifyUserAccount?do=showEditUser</param-value>

</init-param>

</filter>

<filter-mapping>

<filter-name>loginFilter</filter-name>

<url-pattern>/j_security_check</url-pattern>

</filter-mapping>

<security-constraint>

<display-name>Company Security Constraint</display-name>

<web-resource-collection>

<web-resource-name>Protected Area</web-resource-name>

<url-pattern>/private/*</url-pattern>

<http-method>GET</http-method>

<http-method>POST</http-method>

</web-resource-collection>

<auth-constraint>

<role-name>1</role-name>

</auth-constraint>

</security-constraint>

<login-config>

<auth-method>FORM</auth-method>

<realm-name>Form-Based Authentication Area</realm-name>

<form-login-config>

<form-login-page>/login.do</form-login-page>

<form-error-page>/loginError.do</form-error-page>

</form-login-config>

</login-config>

<security-role>

<role-name>1</role-name>

</security-role>

LoginFilter.java

public void doFilter(ServletRequest request,

ServletResponse response, FilterChain chain)

throws java.io.IOException, ServletException{

System.out.println("doFilter is called.");

chain.doFilter(request, response);

}

[2362 byte] By [golden_moona] at [2007-11-26 15:07:39]
# 1
try to see http://www.theserverside.com/discussions/thread.tss?thread_id=32640i hope i helped u! :)
leoncinaa at 2007-7-8 8:57:43 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...