Apache Struts Question:
Download Questions PDF

How to use DispatchAction?

Answer:

To use the DispatchAction, follow these steps :

► Create a class that extends DispatchAction (instead of Action)
► In a new class, add a method for every function you need to perform on the service – The method has the same signature as the execute() method of an Action class.
► Do not override execute() method – Because DispatchAction class itself provides execute() method.
► Add an entry to struts-config.xml

Download Struts Interview Questions And Answers PDF

Previous QuestionNext Question
What is DispatchAction?What is the use of ForwardAction?