Take a look at Chapter 10 - Exception Handling in Programming Jakarta Struts by chuck cavaness.. i think you'll find this very helpful.

I've implement this with Action but ill soon need to do the same for Dispatch Action too... has anyone done likewise for Dispatch and other such actions?



From: "Vijay K Hegde" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: Template Method Design
Date: Thu, 18 Sep 2003 15:01:59 +0530

Hi,

I have a requirement. Anybody has created an abstract action class that extends Action. It makes the perform method as final. And creates an abstract method satPerform that has to implemented by the classes extending thus providing sort of a base class.

The intention behind is to take care of exception handling in the abstract class and rest in the child classes.

Action ---->  perform()
Abstract Class extends Action----> final perform(), abstract satPerform()
SatAction extends Abstract -----> satPerform().

The pattern is Template Method Design.

If anybody has used such approach, please share the details.

If somebody could shed some light in this topic i would be grateful.

Vijay K. Hegde
Software Engineer
Infosys Technologies Limited, Hyderabad
* (040) 2300 5222 extn 23239



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


_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail



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



Reply via email to