Struts Heirarchy of Files

What is heirarchy of files in Struts?

Questions by jeenjustin

Showing Answers 1 - 5 of 5 Answers

In Struts, the hierarchy is, first the control will go to web.xml, then it will check for struts-config.xml in it, it will access struts-config.xml and then it will go into the action-mapping where it will check for the Action class and accordingly it will call the jsp class from the input attribute present in struts-config.xml and then forward to the correct page. 

Struts-config.xml plays an important role in struts framework and it is used mainly to have an access to various Action classes using the Action-mapping element and then to forward it to appropriate jsp files.

  Was this answer useful?  Yes

When the request is recived by ActionServlet it looks for the ActionMapping entries in the Struts-config.xml. ActionMapping returns the appropriate Action class where we handle the business logic.Finally execute() returns the ActionForward key (View).

  Was this answer useful?  Yes

When we send the request from client then first it touches the ActionServlet--->RequestProcessor---->ActionForm(do the required validations)---->Action (execute method is executed)---->Service class(it is the model layer of MVC design pattern)----->DAO class(this class is used to interact with the database)----->response of database interaction is sent back to Action class--->Action class will display the response in terms of JSP on the client machine.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions