Setting Up Struts 2 in Eclipse

You can proceed to setup your Struts 2 framework. Following are the simple steps to download and install Struts2 on your machine.

Step 1:
Setting Up Struts 2 in Eclipse

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 data\Struts 2 video  folder on my Windows 7 machine so that I have all the jar files into D:\personal data\Struts 2 video\struts-2.3.15\lib. Make sure you set your CLASSPATH variable properly otherwise you will face problem while running your application.

Step 3:  Now Open your eclipse environment.

Setting Up Struts 2 in Eclipse

Step 4: Click on Files->New->Other

Setting Up Struts 2 in Eclipse

Step 5:  Click on web->Dynamic web project->next

Setting Up Struts 2 in Eclipse

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

Setting Up Struts 2 in Eclipse

Step 8: Add all these jars to eclipse build path.
Right click on project(Strut2MyFirstApp)->properties

Setting Up Struts 2 in Eclipse

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.




<<Previous <<   || Index ||   >>Next >>


Labels: