I am using JBoss 4.0.2 and JBoss Portal 2.0.  I created an separate portal, and 
it seems to be working.  My company uses Single Sign On, so I would like to 
skip the login form for the login process.  I tried to use a servlet filter to 
automatically login the user.  I put the following configuration in the web.xml 
of the portal:

<web-app>
  
    <filter-name>LoginFilter</filter-name>
    <filter-class>com.xxx.LoginFilter</filter-class>
  
  <filter-mapping>
    <filter-name>LoginFilter</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
</web-app>

I put some debug statement in the code.  I can see that the init() of the 
filter is being called, but the doFilter() does not.  The same filter works in 
other web application running on JBoss.  

Here is the code of the filter:
package com.xxx;

import javax.servlet.Filter;
import javax.servlet.FilterConfig;
import java.io.IOException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.ServletException;
import javax.servlet.FilterChain;

public class LoginFilter implements Filter
{

  public void init(FilterConfig filterConfig) 
         throws ServletException {
    System.out.println("LF init *****************************");
  }

  public void destroy() {}

  public void doFilter(ServletRequest request, ServletResponse response,
                       FilterChain chain )
         throws IOException, ServletException {
    System.out.println("LF doFilter *****************************");
    chain.doFilter(request, response);
  }

}  // end of class

I wonder if servlet filter is not supported by Jboss portal.  Any help is 
appreciated.

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

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


-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to