File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes generic code in action Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "generic code in action" Watch "generic code in action" New topic
Author

generic code in action

mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 250
hi

i have two class who extends DispatchAction

theses two class use the same form class

theses two class have the same action, majority of the code of this theses actions are similar

example



is there a way to use these similar code for my two class who extends DispatchAction?

thanks
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

This seems pretty non-Struts specific.

There are at least a couple of options:

- Create a base class with a call-out to the class-specific part
- Create a sub class that calls a non-class-specific method
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: generic code in action