1. Client clicks
submit button
2. Server receives
client requst with a URL of client
3. Server
reads web.xml and server transfers the Reqst the ActionServlet if matched
4.
ActionServlet Reads 'struts.config.xml'
<Action-mappings>
<action
name="LoginForm" path="/login" scope="request"
type="com.myapp.struts.LoginAction" validate="false"/>
</action-mappings>
While reading Struts.config.xml
·
It
creates the Object of ‘Action class’ and
reads the actionclass path
·
It’s
Cheks any FormBean class is Associated with Action Class by reading the path,name—attributes
·
If
there
I.
It
creates Object of FormBean
II.
And
Executes Setter/Getter methods
III.
Reset()
method
IV.
Validate(-,-)
method
5. After
that It executes the execute(-,-) method
6.After execution
of execute(-,-) method it returns ‘ActionForword’ Object
7.It Contains
the result page in the form of String
8. ActionServlet reads Struts
configuration again and finds appropriate view for the String returned execute(-,-)
method
<forward
name="ok"
path="/ok.jsp"
redirect="true"/>
<forward
name="fail"
path="/fail.jsp" redirect="false"/>
9. Returs the Result page by reading
the Path