Shared utility class is probably your best bet. In my app, I actually created my own dispatch action class that extended my base Action class (by cutting and pasting the struts dispatch action source into my own class changing the 'extends'declaration), though this has various drawbacks, the most notable of which being that you would need to update the code in this class if you changed the version of struts you were using. Id recommend you go with the static utility class, though as other posters mentioned, certain things are better suited to filters, so you do have a couple of options to look at.
-----Original Message----- From: Ashish Kulkarni [mailto:[EMAIL PROTECTED]] Sent: Friday, 31 January 2003 07:30 To: [EMAIL PROTECTED] Subject: one desing question, need help Hi, I want to write 2 classes , one class say MyAction extends Action and the other class say MyDispatchAction extends DispatchAction. I want to have some code ( like setting some parameters or getting connection from pool) handled in both the classes, but i want to write it in such a way that i dont have to code all the common methods in both classes. I dont want to have one class which extends DispatchAction, because DispatchAction needs parameter as required field in struts-config file. This way i would be reducing my coding and future maintenance, since if there is any modification i can do it at only one place and will be applicable to both places Any suggestions are welcome ===== A$HI$H __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]