We use option 1. Our UserAction extends Action and checks for session value user_id. If a particular action needs to verify if the user had logged in (meaning the login action had setup user_id), that action should extend UserAction.
I don't see redundancy of code here, do you? Leo -----Original Message----- From: vivek shrivastava [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 30, 2002 1:23 PM To: [EMAIL PROTECTED] Subject: Need Help: Please do help me Hi, I know following questions have been asked or discussed so many times but I am still confuse. Please do help me. Once a users is logged in, I want to validate each page for a valid user. I understand that I can use "CheckLogon" tab in each .jsp page check for valid user. But I really don't think that it is good idea to mix flow and presentation. We have two other options. 1. We create a base class by extending struts's Action class and define a function to do validation and extend all application specific Action classes using that base class. 2. Or we extend ActionServlet class and define a function to do validation. I think 2nd option is much more flexible and it does not have redundancy of code like first option. I want to know which one is best in real world. If someone has implemented it using either of method, please provide me some sample code so that I can implement it. Please Please do help me. Thanks _________________________________________________________________ Send and receive Hotmail on your mobile device: http://mobile.msn.com -- 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]>