Blog Archives

01: Spring MVC beginner tutorial step by step

This tutorial extends Getting started with Apache Tomcat application server by deploying a simple JEE Application to introduce Spring MVC.

Spring dependencies via Maven

Step 1: Modify the pom.xml file in the simpleWeb project to bring in the Spring web dependency jars.



02: Spring MVC form submission tutorial step by step

This tutorial extends Spring MVC beginner tutorial step by step.

Maven project structure

Model class to capture login form details

Step 1: Create a POJO “Login.java” in the package “com.mytutorial.model” under “src/main/java” to capture login form details like “user” & “password”.



03: Spring MVC with Java Configs instead of XML configs step by step

This tutorial extends Spring MVC form submission tutorial step by step. This tutorial gets rid of web.xml and applicationContext.xml files.

pom.xml changes

Step 1: Add “JSTL” (i.e. JSP Standard Tag Library ) jar dependency, and also override default “maven-war-plugin” by explicitly adding the plugin and setting the “failOnMissingWebXml” to false.…



04: Spring MVC with Thymeleaf and JavaConfigs

Project structure

pom.xml to bring-in Thymeleaf & Spring jars

Step 1: Add “Thymeleaf“jar dependency, and also override default “maven-war-plugin” by explicitly adding the”failOnMissingWebXml” to false to not have web.xml as we will be using JavaConfigs and AbstractAnnotationConfigDispatcherServletInitializer.



05: Spring 4 MVC RESTful Web Service Beginner Tutorial step by step

Install RESTClient from WizTools.org

Step 1: RESTClient is required to test the RESful web services. Go to

http://download.wiztools.org/rest-client/archive/index.html

Download the latest version of “restclient-ui-3.2.2-jar-with-dependencies.jar” file. Copy it to “c:\tools” and run it by Double-Clicking if you are running on windows. If outside windows you can run it as shown below.



06: Spring 4 MVC RESTful GET & POST methods Web Services Tutorial

This tutorial extends Spring 4 MVC RESTful Web Service Beginner Tutorial step by step.

Controller that supports GET with path variable & POST methods

Step 1: The “AccountController.java” that has two additional methods to support requests like

GET: http://localhost:8080/simpleWeb/entry/v1/forecasting/account/123

POST: http://localhost:8080/simpleWeb/entry/v1/forecasting/account



11 Spring MVC Interview Q&As

Q1. Can you describe the Spring Web MVC framework architecture? A1. Spring Web MVC framework provides a Model View Controller architecture to develop loosely coupled 1) web applications 2) RESTful…



800+ Java & Big Data Interview Q&As

200+ Java & Big Data Tutorials

Top