| Author |
how to inherit a class in Action class
|
samir ware
Ranch Hand
Joined: Jul 27, 2005
Posts: 186
|
|
hi , I come across the problem of inheriting the class in an Action class. As per the struts frame work implementation the actoin class implemaenation should be as follows class DbAction extends Action { execute(); } that means my action class(DbAction) should inherit the Action class. But what if I want to extend one more class in DbAction. for eg . suppose I have a class DataBase that has the methods for connecting to database, releasing the connection ,firing any queary etc. and all these methodes are PROTECTED. so in order to access these methodes I should extend the class DataBase in DbAction . But my DbAction already extends Action and its not possible to extend more than two classes in java. So how shouls I proceed. Plzzzzzzzzzz let me know the solution for the same. Thanks in advance, Samir
|
 |
vidya sagar
Ranch Hand
Joined: Mar 02, 2005
Posts: 580
|
|
hi samir Have a model class which extends ur Db class. Then make a call from ur action class to your model class
|
 |
 |
|
|
subject: how to inherit a class in Action class
|
|
|