[jboss-user] [JBoss Seam] - add my own interceptor with problems

tangdazhu do-not-reply at jboss.com
Fri Apr 13 05:36:08 EDT 2007

1.I want to add  my own login interceptor in my application,the following is my 
interceptor class

public class LoggedInInterceptor {
    private Log log;

    public Object checkLoggedIn(InvocationContext invocation) throws Exception {

	boolean isLoggedIn = Contexts.getSessionContext().get("user_status") != null;
	if (isLoggedIn) {
	    // the user is already logged in
	    log.info("Login interceptor is invoked!", null);
	    return invocation.proceed();
	} else {

	    // the user is not logged in, fwd to login page
	    return "login";


2.i want to use this interceptor in my managed bean

public class LongCardQueryAction extends BaseBean {....}

but it seems that that interceptor doesn't work, can anyone tell me what's wrong with my problem?

I just guess i need to config this interceptor in some place ,but i don't know where it is.

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

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

More information about the jboss-user mailing list