Struts Controller UML diagrams Last update : 20/10/2002 back to HOME PAGE


The goal of this article is to illustrate the Struts Controller with UML diagrams. This article is an introduction to the Struts framework in order to help beginners programmers to understand the MVC model 2. I have written a new version of this article updated for Struts 1.1, please have a look (here!) and feel free to send me your comments.

Contents :

  1. Context description of the example with the struts-config.xml file
  2. Struts 1.02 Controller Class Diagram of the org.apache.struts.action package and the example classes
  3. Sequence Diagram
  4. Links about Model View Controller model 2 pattern and the Struts implementation.
  5. Credits - about the author of this article and to know if you can use the diagrams in your project
  6. DO YOU NEED HELP with Struts ? As tens of people from all over our small planet who have written me, do not hesitate !!! Unfortunately, I am unemployed at the moment so I have a lot of time and it's FREE ! Just make an effort when you describe your problem.

    To print the figures of this article, configure your printer in landscape mode.

back to Top
1. Context description

In order to show how to use the Struts framework classes, I have designed some diagrams starting from a simple example : a client submits a form to a "forwarded" page :


This is the configuration resource file - which is parsed by the Struts Controller for initialization.

back to Top

2. Struts 1.02 Controller Class Diagram

org.apache.struts.action package description

The Action class is created and used by ActionServlet. It is a wrapper around Business logic. To use Action, subclass and overwrite the perform() method.

User classes description

forwardedPage.jsp is not a class, it is the targetted jsp page.

back to Top

3. Sequence Diagram

Messages Description

back to Top

4 Links

Ted Husted's Struts MVC resources page :

Model View Controller model 2 in Struts documentation :

Introduction of MVC by sun :

Presentation of Struts, MVC 2 with a detailled example :

Other presentation of Struts, with J2EE patterns :

back to Top

5 Credits


I am a French developer who lives in London (CV).


I have given all the diagrams to the Apache Software Foundation. However, if you want to use it for commercial purposes, please send me an e-mail.

Otherwise, you can use it if you add the following credits :

ClassStrutsMVC2.gif, SequenceStrutsMVC2.gif submitted diagrams by Jean-Michel Garnier on April 02. Based on article by Jean-Michel Garnier in the web site. Copyright (c) 1999-2001 The Apache Software Foundation. All rights reserved.

back to Top

For any comments / suggestions :Jean-Michel Garnier