Newsletter

Spring Boot + Spring MVC + JSP Hello World Example

Spring-Boot-Tutorials » on May 17, 2018 By Sivateja

This article describes how to create a Spring MVC application using Spring Boot. As this is an MVC application unlike previous examples, we have to create a webapp folder under /src/main (src > main > webapp) where we will place all our .jsp files.

Dependencies

Final pom.xml

application.properties

In the current example, I am going to put all my .jsp file(s) under /WEB-INF/jsp/ folder, no need to mention ‘webapp’ in the properties file as spring boot by default consider that folder and search under webapp.

SpringBootApp.java

SpringJava4sController.java

welcomePage.jsp

Output

Run the application and hit http://localhost:8080/springbootmvc/

You Might Also Like

  ::. About the Author .::

Java4s_Author
- Full Stack Java/J2EE & UI Web Developer
Founder of Java4s - Get It Yourself, A popular Java/J2EE Programming Blog, Love Java and UI frameworks.
You can sign-up for the Email Newsletter for your daily dose of Java tutorials.

Comments

Name*
Mail*
Website



By posting your answer, you agree to our comments policy.
Most Recent Posts from Top Categories
Hibernate Spring Struts
Contact | About Us | Privacy Policy | Advertise With Us

© 2010 - 2018 Java4s - Get It Yourself.
The content is copyrighted to Sivateja Kandula and may not be reproduced on other websites.