Struts2 Hello World in Eclipse

Struts2 Hello World Example in Eclipse

Below Example use struts2.3.X version

Project Structure

Strut2 Hello File Structure

—index.jsp—

 

—HelloWorld.jsp—

 

—web.xml—

 

—struts.xml—

 

—HelloWorldAction.java—

 

—MessageStorage.java—

 

—pom.xml—

 

—OUTPUT—

 Struts2 Hello World

 

Download Struts2 Hello Program

 

Source: http://struts.apache.org/release/2.3.x/docs/create-struts-2-web-application-using-maven-to-manage-artifacts-and-to-build-the-application.html

Struts 2.x Maven showcase for Eclipse IDE

I faced problem while running Struts2 program in Eclipse. So I decided to find a solution for that though an easy solution (plugin) is available in Netbeans.

See how to configure Struts2 in Netbeans

But I want to get it running in Eclipse
There is no such plugin available of struts2 for Eclipse as there is for NetBeans.
But Struts2 can be configured in Eclipse using Maven.

According to the experts it’s an easiest starting points to get the war and then modify it according to your need

See Discussion

There is an official war file available. Follow the steps to get it running

Step 1: Install Maven using Eclipse market place or manually downloading plugin.

Step 2: Download the Struts2 war Struts2.3.14 for Eclipse

Step 3: Import downloaded war file in Eclipse

Now run the project. Enjoy!

 

Searching for Struts2.3.14 jar files? Download struts2.3.14 jar