views:

134

answers:

1

Can anyone tell me the control flow of struts. Which program will be called first?

+2  A: 

Your question is pretty vague, but i'll give it a go.

In your web.xml you need to specify that you are using the Struts ActionServlet. What happens then in the flow is defined in your struts-config.xml. There you specify which request is handled by which action.

Edit: when verifying something i found this: http://www.allinterview.com/showanswers/56972.html

It describes the struts flow in more detail;

The browser makes a request to the Struts application that is processed by ActionServlet (Controller). ActionServlet (Controller) populates the ActionForm (View) object with HTML form data and invokes its validate( ) method. ActionServlet (Controller) executes the Action object (Controller). Action (Controller) interfaces with model components and prepares data for view. Action (Controller) forwards control to the JSP (View). JSP (View) uses model data to generate a response to the browser.

Jeroen Dierckx