3. Have an abstract BaseAction class for your webapp. All of your concrete Actions subclass your BaseAction. Perform the login check in the BaseAction's execute method. Make the BaseAction's execute method final. BaseAction defines an abstract method called executeAction which the subclasses must implement to do their processing. BaseAction's execute method calls executeAction after performing the login check.
The big downside to the above approach is that if you want to make use of other Struts Actions like ForwardAction or LookupDispatchAction then you can't. We'll you can but then you have to subclass each of these and add your login check which leads to a proliferation of classes. > -----Original Message----- > From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 22, 2003 7:58 AM > To: 'Struts Users Mailing List' > Subject: RE: To check if user is logged in > > > Hi, > I can think of the following > > 1. Write Request Filters according to the Servlet spec. > 2. Extend the Struts1.1 RequestProcessor > > Mohan > > -----Original Message----- > From: Suresh Addagalla [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, January 22, 2003 6:21 PM > To: 'Struts Users Mailing List' > Subject: RE: To check if user is logged in > > > Hi, > > Are you talking about CheckLoginTag.java in struts-example.war? > > This implements the check using a custom tag. But I need to forward to > login page even before I forward my request to the JSP, in my controller > itself. > > Suresh > > >-----Original Message----- > >From: julian green [mailto:[EMAIL PROTECTED]] > >Sent: Wednesday, January 22, 2003 6:22 PM > >To: Struts Users Mailing List > >Subject: Re: To check if user is logged in > > > > > >have a look at the struts example that comes with struts. It has an > >example of what you are doing in there. > > > > > > > > > >-- > >To unsubscribe, e-mail: > ><mailto:struts-user->[EMAIL PROTECTED]> > >For > >additional commands, > >e-mail: <mailto:[EMAIL PROTECTED]> > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

