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 18.104.22.168 and later.
- Install the packaged server by typing ‘java -jar Struts2Sample.jar’ and following the instructions.
- 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.
- 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).
- 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.
- Copyright.txt (copyright notice for this sample)
- readme.html (these instructions)
- server.xml (sample server using Struts 2 shared library)
- PhoneBookByStruts2-1.0.0.war (samples Struts 2 Web application)
- Struts2SampleLibs.xml (shared library configuration for Struts 2)
- Struts2SampleLibs (Struts 2 and pre-requisite libraries – downloadable during installation)
For further information and resources for developers using IBM WebSphere Application Server, please visit wasdev.net.