struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mohan Radhakrishnan <Moh...@hclcomnet.co.in>
Subject Login filter
Date Tue, 24 Dec 2002 08:39:03 GMT
Hi,
       
    I wanted to clear a doubt about this. Do I remove the conventional login
check from my LoginAction to the filter ? That seems to be the right way to
use a filter.

     1. Check for the user container( username,password object ) in the
session.
     2. Call the isNew() method of the session.


     The first method might be like this.

     	  session = req.getSession( true );
	  if( session.getAttribute( WebConstants.USER_KEY ) == null ){
	
session.getServletContext().getRequestDispatcher("login.action");
	  } else{
		chain.doFilter( req, response );
	  }

     What about the second method ? I need to restrict the login action from
being filtered itself. Any advice is appreciated.

Thanks,
Mohan

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message