- Make a choice whether you want to install Struts2 on Windows, or Unix and then proceed to the next step to download .zip file for windows and .tz file for Unix.
- Download the latest version of Struts2 binaries from http://struts.apache.org/download.cgi.
- At the time of writing this tutorial, I downloaded struts-2.3.15-all.zip and when you unzip the downloaded file it will give you directory structure inside D:personal dataStruts 2 videostruts-2.3.15 as follows.
Step 2: Second step is to extract the zip file in any location, I downloaded & extracted struts-2.3.15-all.zip in D:personal dataStruts 2 video folder on my Windows 7 machine so that I have all the jar files into D:personal dataStruts 2 videostruts-2.3.15lib. Make sure you set your CLASSPATH variable properly otherwise you will face problem while running your application.
Step 3: Now Open your eclipse environment.
Step 4: Click on Files->New->Other
Step 5: Click on web->Dynamic web project->next
Write your project Name in the text box. I have written “Strut2MyFirstApp“
Now here, I am assuming you have apache tomcat 7 server installed in your machine. If you
have target runtime as none then you can refer configure Apache Tomcat in STS IDE.
Now click on Finish button.
Step 6: Now go to location where you have download strut2 package and open lib
folder.you can have all jars but for now you can copy following jars
Step 7: Paste all above copied jars to WebRoot->WEB-INF->lib
Step 8: Add all these jars to eclipse build path.
Right click on project(Strut2MyFirstApp)->properties
Step 9: go to project->WebContent->WEB-INF->lib and select all jars then click on ok.
Step 10: Click on ok.
Now you are done with configuring strut2 in eclipse.You can create your struts 2 project.