Probably you can create a Generic Action class which extends Struts Action
class and make all your Action classes extend this class. You can then put
the reusable methods in this class and it can be used by all your Action
classes.

-Prasenjit


-----Original Message-----
From: Ciaran Hanley [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 30, 2004 3:46 PM
To: Struts User Mailing List
Subject: Reusing methods across actions classes


Hey,

 

Bit of a dummy question here but I am wondering what is the best way to
reuse methods across different action classes. Is it acceptable to make
an
instance of an action class within an action class so I can use one of
its
methods. Or would it be better to simply copy and paste the method into
the
both classes. Or should I extract all common methods into one class and
create an instance of this class as required. Any suggestions?

 

CH

"Quinnox is an Award Winning IT services organisation, accredited to CMM
Level 5. We are successfully delivering Application Development,
Integration, Support and Testing services to clients in the Finance,
Manufacturing, Retail and Telecom sectors. Particular focus areas include
e-Business and ERP (notably SAP) solutions."

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to