Struts v2.3.8 Integration

June 14, 2013


This open source integration demonstrates Struts 2 Web framework integration through a simple phonebook sample Web application deployed to Liberty.


This samples demonstrates Struts 2 Web framework integration through a simple phonebook Web application deployed to Liberty.

The samples uses Struts 2.x as the model-view-control framework for presentation logic and Spring as the IoC container to inject a bean into a Struts 2 action.

This sample can be installed onto runtime versions and later.


  1. Install the packaged server by typing ‘java -jar Struts2Sample.jar’ and following the instructions.
  2. Start the Struts2Sample server by running the command ‘bin/server run Struts2Sample’ from the root of the Liberty profile installation, and confirm the application started by looking in the console output":
    CWWKZ0001I: Application PhoneBookByStruts2 started in XX.XX seconds.
  3. In your browser, enter the URL for the application: http://localhost:9114/PhoneBookByStruts2/ (where port 9114 assumes the httpEndpoint provided in the sample server.xml has not been modified).
  4. In your browser, you should see the phone book displayed.


This sample does not include the open source dependencies. The installer will provide a list of the open source pre-requisite libraries and where they can be downloaded from. To help obtaining these libraries, the installer provides the option to download them on your behalf.

Sample Structure

  • wlp
    • usr
      • servers
        • Struts2Sample
          • Copyright.txt (copyright notice for this sample)
          • readme.html (these instructions)
          • server.xml (sample server using Struts 2 shared library)
          • apps
            • PhoneBookByStruts2-1.0.0.war (samples Struts 2 Web application)
      • shared
        • config
          • Struts2SampleLibs.xml (shared library configuration for Struts 2)
        • resources
          • Struts2SampleLibs (Struts 2 and pre-requisite libraries – downloadable during installation)

Support Information

For further information and resources for developers using IBM WebSphere Application Server, please visit