aspose file tools*
The moose likes Struts and the fly likes Calling a Action class which doesnt have a Perform() or Execute() method. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Calling a Action class which doesnt have a Perform() or Execute() method." Watch "Calling a Action class which doesnt have a Perform() or Execute() method." New topic
Author

Calling a Action class which doesnt have a Perform() or Execute() method.

Shan Krish
Greenhorn

Joined: Oct 12, 2010
Posts: 4

Hi All ,

I have all my appliaction written in User defined Struts framework. I have my userdefined struts-config file calling a Action class below (whole code),



It calls this class which doesnt have any Perform() or Execute() method and the class extends BatchTypeDetailAction which has Perform() method returns RequestForward . my question is which method from the above BatchChildDetailAction class is called without any instance calling the method & the class dont have Perform() or Execute() method.How my flow goes ???





Please revert back for any doubts in my question ...

Thanks Folks.. Expecting a answer.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

Welcome to the JavaRanch.

the class dont have Perform() or Execute() method


BatchChildDetailAction inherits the perform method from BatchTypeDetailAction.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Shan Krish
Greenhorn

Joined: Oct 12, 2010
Posts: 4
Thanks Joe ,

Yes, you are right . But when "BatchChildDetailAction" is intially called , will it automatically looks for the Perform() method in default ?.

And again further BatchTypeDetailAction extends TypeDetailAction extends GetDetailActionBase which contains another Perform() method , so will the hirarchy keeps going to call the upcoming Perform() method with ends in ActionBase class ? or will it stop with the first Perform() and process it ? .


BatchChildDetailAction ---- BatchTypeDetailAction- Perform() ---- TypeDetailAction ---- GetDetailActionBase -Perform() ---- ... ----- .... ----- ... ----- ActionBase -Perform()


These question arises since the code is a userdefined struts framework which even the ActionBase & ControlServlet is.


Thanks
Shan


Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8927
    
    9

Struts Actions follow the same rules of inheritance that are true for any Java class. You should have a look at the Java tutorial, in this case, the chapter on Inheritance.
A little reading now will save you a lot of agony in the long run.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Calling a Action class which doesnt have a Perform() or Execute() method.