Explain Struts navigation flow

Explain Struts navigation flow.

- After deploying the application in the server, the container reads the information from web.xml.

- The ActionServlet object will be created. The init() method for ActionServlet will be invoked.

- The getters() and reset() methods of FormBean method will be invoked, after the client sent a request using .jsp extension.

- After pressing the submit button by the client, the setters() and validate() methods will be invoked.

- In case the page is not a valid page, the form redirects to another page that is indicated from the struts-config.xml file.

- The Action class object will be created when and if the data is valid.

- The business logic in Model can be specified and provides that object in execute() method.

- Once the business logic process is done, it forwards to a page( a success page ) that is specified in struts-config.xml file.

Explain Struts navigation flow.

- When an action servlet gets the request, it initiates the servlet-config.xml.

- It selects an appropriate page as per the mapping.

- If the accessed file is .java, an appropriate action is taken and then it is forwarded to the file specified in the struts-config.xml.

- If the accessed path is .jsp, the action bean is invoked where the user input is validated on the failure of which an error message is simply displayed else the action servlet is executed and then forwarded to the necessary page as in mappings.foward().
Explain the design patterns used in Struts
Design patterns used in Struts - The Struts design pattern has N-tier architecture. This includes MVC architecture, Web applications characters, struts framework which includes – architecture, design patterns and coding idioms.....
Different kinds of actions in Struts
Different kinds of actions in Struts - The different kinds of actions are done by the following: DispatchAction, ActionDispatcher , LookupDispatchAction.....
What is Action Class?
What is Action Class? - An Action class in the struts application extends Struts......
Post your comment