From the course: Spring: Spring MVC

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Add static files and view resolver

Add static files and view resolver

From the course: Spring: Spring MVC

Start my 1-month free trial

Add static files and view resolver

- Now the next step will be to add a couple of more dependencies, so that the Spring Boot project that we created can run well with Java Server Pages. We're going to work with JSPs as the part of this course, so let's do that. Under your Resources folder you already have a file which says, Dependencies for Spring mvc with Spring boot. So just open that file, and if you see at the top, you have a couple of dependencies which is for the javax.servlet API and the Tomcat Embed Jasper API. And this is what you need in order to work with JSPs. So let's copy them, come back to IDE, and paste them in the pom.xml. So, I'll go right down there and if you see on line 47, I'll paste both of them. Also, make sure that this Enable Auto-Imported at the right-hand side bottom part of your screen is clicked, so that anymore dependencies that you add in pom.xml are picked up by the Maven build. Next is to add the JSPs to the web…

Contents