File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

generic code in action

 
mark smith
Ranch Hand
Posts: 251
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic