Spring MVC Project: Setup

Software Requirements
  • Eclipse Mars 2
  • Java, jdk 1.6 and above
  • Spring 4 jar files(download)
  • Apache Tomcat 7 
Step 1: Create a Dynamic Web Project(File>New>Dynamic Web Project)


Step 2: Create project folder and packages as shown below


Step 3: Add required Spring MVC libs


Step 4: Add following code in web.xml



Step 5: Add following code in servlet-context.xml







Step 6: Add following code in application-context.xml







Step 7: Add following code in TheContrller.java





Step 8: Add following code in 2 jsp files- hello.jsp and link.jsp 




Step 9: Start the tomcat server



Step 10: Open the browser and open http://localhost:8080/SpringMvcBySarthak/hello

GitHub of the project here

Comments

Post a Comment

Popular posts from this blog

AWS LEX - Developing a Simple Chat Bot

BUILDING A CHAT BOT USING MICROSOFT AZURE BOT SERVICE & LUIS

Connecting Mongo DB with NodeJS