Mar
23
2014

spring web application example

This is simple spring program to understand the flow of sping.

Open your eclipse and click file >new >dynamic web project as shown below.

spring web application example

spring web application example

Enter name of your project as javasharepoint >choose your target runtime (i.e. server) > finish.

spring2

 

Directory structure of this program is shown below

dirspring

 

Required files :-

1. web.xml

2. dispatcher-servlet.xml

3. index.jsp

4. welcome.jsp

5.  JavaSharePointController.java

web.xml

 

dispatcher-servlet.xml

welcome.jsp

index.jsp 

 

 

JavaSharePointController.java

To Run your program Right click on your project > Run As >Run on server >finish

Output :-

spring5

When click over this url the next page will be

spring6

Download this example

Please Add the jar files of spring framework in lib folder. If you don’t have then download form the following link.

Download jar of spring.

About the Author: devender kumar

java/j2EE developer

Comments are closed.