Struts 2 Hello World With Eclipse, Maven and Jetty

I just adapted mkyong’s Struts-2 tutorial [1] to work with embedded Jetty in Eclipse.

How Project Explorer looks like:

struts2_2

– Create a new project in Eclipse via File > New > Dynamic Web Project
– Add “src/main/java” and “src/main/resources” to classpath and change output folder as “target” and click finish
– Right-click the project name in Project Explorer, Configure > Convert to Maven Project

struts2_1

To run with Maven:

clean install jetty:run

To test:

http://localhost:9091/Struts2-Test/Index.action

struts2_3struts2_4

Resources:

[1] https://www.mkyong.com/struts2/struts-2-hello-world-example/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: