It was a good idea to put the user logging check in the BaseAction class. This will be used as a firewall before allowing to access any resource (Action class). The required code for User Information check can be put in the execute method and another method like delegateToExecute(..) can be made abstract and this method can be called as the last statement in BaseAction's execute method. if the check is successful, the control goes to the delegateToExecute(..) method for the requested class where you can put ypur regular code. Since delegateToExecute(..) will be made abstract, that needs to be implemented in all teh actions which import the BaseAction.
Thanks, Rajasekhar Cherukuri Please respond to "Struts Users Mailing List" <user@struts.apache.org> To user@struts.apache.org cc Subject Base action class Hello, I am trying to use a BaseAction class for my action, and i have been wondering what to put in there; As for now, i have put the basic stuff there like finding a forward for a database faillure and so on.. (like in the mailreader example by the way). Also, i have put a method that retrieves a handler from the servlet context that all actions need. Is this a good idea? I wonder whether it's a good idea to do authorization in the base class by implementing an abstract execute method that will check whether a user is logged in.. All action classes then will first call this abstract execute method. What do you put in base classes? Thanks --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ForwardSourceID:NT00005876 Notice: The information contained in this e-mail message and/or attachments to it may contain confidential or privileged information. If you are not the intended recipient, any dissemination, use, review, distribution, printing or copying of the information contained in this e-mail message and/or attachments to it are strictly prohibited. If you have received this communication in error, please notify us by reply e-mail or telephone and immediately and permanently delete the message and any attachments. Thank you