Pages Navigation Menu

Coding is much easier than you think

Struts 2 Environment Setup

Struts 2 Environment Setup

 
In our previous tutorial we got introduced to what a framework is, and why we go for struts 2. In this tutorial you will learn how to setup development environment for Struts 2 Framework.
 

Environment Used

 

  • JDK 7 (Java SE 7)
  • Eclipse JUNO IDE
  • Apache Tomcat 7.x
  • Struts 2 jars
 

Setting up development environment

 
To install Eclipse IDE and to configure Apache Tomcat read this page
 
Struts 2 Framework library download:
Downloading Struts 2 Framework: It is available for downloading straight from its official site. The latest version of this framework for this day is 2.3.8

Simply go to http://struts.apache.org/.

Choose Struts-2.3.8 Download option as shown on the picture below:
 
Installation
 
Extracting Struts 2 download: Now extract the downloaded file (struts-2.3.8-all.zip) into your favourite. Say, D:\\Struts 2.3.8-all\

And download latest version eclipse from http://www.eclipse.org/, once installed
 
** UPDATE: Struts 2 Complete tutorial now available here.

 
Create a Dynamic Web Project:

Now create a new Dynamic web project using the following option:
File > New > Dynamic Web Project and enter project name as LoginStruts2 and set rest of the options as given in the following screen:
 
1
 
Now copy following files from struts 2 lib folder D:\struts-2.3.8-all\lib to our project’s WEB-INF\lib folder.

Now restart your tomcat server or build and clean it.
 
That’s all on how to create a Struts 2 project in eclipse, in our next article we shall learn to implement a basic hello world program in struts 2
 

About Mohaideen Jamil


I'm a Full stack developer of IT exp in J2EE, AngularJs, MicroServices, Docker, Spring (Boot, MVC, Cloud), Bluemix, DevOps. Follow me on Facebook or Google Plus. If you like my tutorials, consider making a donation to this charity, thanks.

Advertisements