Configuring struts 2 in eclipse


This is 2 of 8 part of struts 2 tutorial.In this part,we will configure struts 2 in eclipse.

Tutorial Content:

First you need to download struts 2 framework from apache website .Click on “Download now” and Struts 2 will be downloaded on your machine.

Now Open your eclipse environment.

Click on Files->New->Other

Click on web->Dynamic web project

Write your project Name in the text box.I have written “Strut2FirstProject”
Now here,I am assuming you have apache tomcat server installed in your machine.If you
have target runtime as none then you can refer configure Apache Tomcat in Eclipse IDE.
Now click on Finish button.

Now go to location where you have download strut2 package and open lib can have all jars but for now you can copy following jars

  • struts2-core-
  • xwork-core-
  • ognl-3.4
  • commons-io-2.0.1
  • commons-fileupload-1.2.2
  • javassist-3.11.0.GA
  • freemarker-2.3.18
  • commons-lang-2.5
  • commons-logging-1.1.1
  • commons-logging-api-1.1
  • struts2-dojo-plugin-

Paste all above copied jars to WebContent->WEB-INF->lib

Add all these jars to eclipse build path.
Right click on project(Strut2FirstProject)->properties

Click on Java Build Path and then Add jars as shown in above diagram.

go to project->WebContent->WEB-INF->lib and select all jars then click on ok.

Click on ok.
Now you are done with configuring strut2 in eclipse.You can create your struts 2 project.
In next post we will write Hello world example in struts 2 .



  1. bhawana July 31, 2013
  2. Manoj Prabhakar August 24, 2013
  3. Maneesh Jha December 7, 2013
  4. suresh December 26, 2013
  5. rtrtrt February 7, 2014
  6. Ashish March 3, 2014
  7. veeresh chauhan April 4, 2015
  8. Long July 7, 2016

Add Comment