Struts Helloworld Example

In this tutorial we will learn how to create a simple hello world example in Struts1.

Technologies used in this article :

1. Struts1.3
2. Maven 1.4
3. Eclipse 4.2
4. JDK 1.5

1. Create Maven Web project in Eclispe and add the Maven  dependencies like as as below Maven’s pom.xml file.

2. Configure the Action Servlet in web.xml .

3. Implement the Form bean named “HelloForm” .

4. Implement the Action class  named “HelloAction”

5. Configure the Action Class and form bean in struts-config.xml like as below.

6. Finally  Project Structure in Eclipse should like as below.

strutshelloworld

7. Configure the Tomcat server In eclipse , Deploy and run the “Hello World struts Application” .

Use the URL in browser like ‘http://localhost:8080/StrutsHelloWorld/hello.do’

 

OUT PUT:

Struts_Helloworld_output

 

Download  Source Code

 

Posted in struts and tagged .

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">