Struts 1.1 Controller UML diagrams Last update : 19/12/2003 back to HOME PAGE


The goal of this article is to illustrate the Struts 1.1 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.

Contents :

  1. Context description of the example with the struts-config.xml file
  2. Struts 1.1 Controller Class Diagram of the org.apache.struts.action
  3. Sequence Diagram
  4. Links about Model View Controller model 2 pattern and the Struts implementation.
  5. Use my diagrams - the license to respect if you want to use the code

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. Class diagrams


I have forgotten the association between the Action class and the ActionServlet. I will update the diagram after the summer ...

Application config, org.apache.struts.config package

ModuleConfigImpl contains a collection of static configuration information that describes an application module. For application initialization, struts-config.xml is parsed in order to dispatch mapping information in instances of ActionConfig, ForwardConfig and FormBeanConfig.

Struts Controller

The ActionServlet class is the core of the framework. It is an HTTPServlet which receives requests from the browser and forwards it depending on a configuration file : struts-config.xml.

The subclasses of Action are created and used by RequestProcessor. It is a wrapper around Business logic. To use Action, subclass it and overwrite the execute() method.

HTML Form management

Nb : You can still define your own ActionForm in the Struts 1.02 way, by sub-class ActionForm.

User classes

forwardedPage.jsp is not a class, it is the targeted jsp page. represents the View in the Model view Controller model 2 pattern.

Error management

back to Top

3. Sequence Diagram

Messages Description

back to Top

4 Links

back to Top

5 Use my diagrams

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 :

ClassStruts1_1.gif, SequenceStruts1_1 submitted diagrams by Jean-Michel Garnier on October 02. Based on an article by Jean-Michel Garnier in the web site. Copyright (c) 1999-2002 The Apache Software Foundation. All rights reserved.

back to Top



I am an European software engineer who lives and works in London. For any comments / suggestions : send an e-mail to g a r n i e r j m @ y a h o o.f r (remove the spaces to get my e-mail, I have done that bc the sobig virus has filled my mailbox!).

I am looking for a job. Ideally, I want to work on a J2EE web-project within a team applying Agile methods and using cutting edge technologies: Hibernate, Tapestry, Inversion of Control Frameworks, ... (Contract / Permanent). Please take a look at my CV.


The source is free to use and is available under the GNU GENERAL PUBLIC LICENSE.

back to Top