Prerequisites for Struts2 Application Development
Struts2 libraries - In order to start Web development using Struts2, you need to download Struts2 library jar files. The Struts2 downloads are available at http://struts.apache.org/download.cgi . If your Internet bandwidth is good, you can download the full distribution (90MB) which includes source code, documentation and essential libraries. A much smaller file is also available which includes only the Struts2 jars (Essential dependencies only – 4MB). For developing the sample project, you need only the “essential dependencies” distribution.
J2EE IDE (Eclipse) - The next item you need is a good Web application development IDE. Currently none of the IDEs out there supports automatic creation of a Struts2 project. In this book I will be using Eclipse IDE with J2EE support. It is very easy to develop Web applications using Eclipse and more importantly it is free! You can download Eclipse from http://www.eclipse.org/downloads/ Look for the “Eclipse IDE for Java EE Developers” version (120MB+) which contains everything needed to develop a Web application.
Tomcat Server (6.0) – In order to run your Struts2 applications, you need an application server. For the examples in this book, I will use Tomcat which is lightweight and can be easily integrated with Eclipse IDE. Tomcat 6 can be downloaded from http://tomcat.apache.org/download-60.cgi. Choose binary distribution and then extract the downloaded zip to a suitable directory.
Java SDK (J2SE 1.6) – Last but not least you need to have Java compiler installed on your machine. In this book I will be using the latest Java version out there – Java 1.6. Before you go any further verify your Java version by typing “java –version” at the command prompt. Java distribution can be downloaded from http://java.sun.com/javase/downloads/?intcmp=1281.
Configure Tomcat Server in Eclipse - Integrating Tomcat with Eclipse allows us to run the Struts2 projects directly from Eclipse. Follow the instructions below to configure tomcat.

From the server tab in Eclipse, right click and click on New->Server. From the list select Apache->Tomcat 6.0

Click on Next. In the next screen select the tomcat installation directory (directory inside which you have bin and webapps directories). Also ensure that JRE 1.6 is selected.

Click on Finish to complete configuration. Now the Tomcat server is ready to be started from Eclipse.