Get all updates of Java4s
Follow Us: Email Newsletter

Struts Execution Flow Diagram, How Struts Works

Struts » On Oct 22, 2011 { 29 Comments } By Sivateja

Let us see the execution flow of struts2

Execution flow of struts

  • When a client request is given, a web container will receive request
  • Web container loads web.xml and verifies whether the url-patterns are verified or not, if matches web-container transfer the request to FilterDispatcher
  • FilterDispatcher hand overs the request to ActionProxy, it is a proxy class which is responsible to apply before and after services to original business logic
  • ActionProxy contacts ConfiguraionManager class, to know the suitable Action for the request and the needed services for the request
  • ConfigurationManager class loads structs.xml and provides the required information back to ActionProxy
  • ActionPorxy delegates the request along with its information to ActionInvocation
  • ActionInvocation executes the interceptors added to an Action from 1 – N, after that it will call the business logic implemented from N – 1 in reverse order
  • ActionInvocation receives finally result produced by an action aclass
  • ActionProxy transfers the result back to FilterDispatcher
  • FilterDispatcher selects an appropriate view, basing on the result
  • Finally FilterDispatcher uses RequestDispatchers forwarding mechanism and forward a view as a response back to the client


You Might Also Like

  ♦ About Author ♦

Full Stack( Java/J2EE & UI/UX ) Developer and founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog. Sign-up for the Email Newsletter for your daily dose of Java tutorials.


29 Responses to “Struts Execution Flow Diagram, How Struts Works”
  1. sridhar says:

    Explanation is nice…but i want to know more about
    ACtion invocation and ActionProxy class ???can you explain it ….

  2. Nagesh says:

    Very Nice Article

  3. Punam says:

    this article is nice but i would like to know more about stut1.3.could u plz help me…..

  4. suneel says:

    i would like to work struts1.x with hibernate , but i don’t have an idea .
    please provide one sample application.

  5. prasant says:

    nice man….
    but i want to know more about annotations used in struts 2.x?

  6. Really a nice description of concept.
    Thank You.

  7. Thank u for providing information

  8. Good Explanation.Thank you.

  9. Venkatsh says:

    I really like the explanation :)

  10. sivateja you are very Greate…..i salute you.

  11. manju says:

    this article is really nice thanx..

  12. N kiran says:

    simply thanks team…….

  13. Explanation is nice…but i want to know more about
    Action invocation and ActionProxy class ???can you explain it ….

  14. manjari says:

    yes…this article is really helping to me..

  15. harikrishna says:

    thank u sir it was very helpfull to me…

  16. RAJ9992 says:

    Really Nice job Java4s …….

  17. Saidulu Kakunuri says:

    Nice Explanation Shiva …

  18. Ullu says:

    very very nice

  19. Barga Deori says:

    nice explanation of struts work flow.. thanks a lot

  20. rakesh kumar says:

    nice sir ji……….

  21. suneetha says:

    so nice explanation……………………..

  22. Uday Gupta says:

    Nice Explanation and Very Informative. Thanks

  23. vishal jaiswal says:

    the way of explaining is too good……….thanks……

  24. Really nice it very helpful to learners……..tnqq

  25. Nidheesh says:

    Good Explanation I need to know more on Action proxy and filter dispatcher. Anybody please help

  26. Ram says:

    Excellent Sivateja.
    Very nice explanation. I conveyed the same in my interviews and I got into them. Well done. Keep it up.


    discuss the cloud computing architectures


By posting your answer, you agree to our comments policy.
What would you like to learn today?
Browse these popular technologies
Hibernate spring struts Servlets ajax Log4j jQuery Json Core Java Web Services AngularJs
Most Recent Tutorials
Hibernate_Logo Hibernate Recent Posts Spring_Logo Spring Recent Posts Struts_Logo Struts Recent Posts
Useful Links Current & UpComing Tutorials
  Web Services [ SOAP ], JSP
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2016 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.