Home » Tag Archives: Spring MVC (page 7)

Tag Archives: Spring MVC

Spring MVC Form Validation (With Annotations)

spring-interview-questions-answers

This post provides a simple example of a HTML form validation. It is based on the Spring MVC With Annotations example. The code is available on GitHub in the Spring-MVC-Form-Validation directory.                 Data For this example we will use a bean and JSR303 validation annotations: public class MyUser { @NotNull @Size(min=1,max=20) private String name; @Min(0) @Max(120) private ...

Read More »

DeferredResult – asynchronous processing in Spring MVC

spring-interview-questions-answers

DeferredResult is a container for possibly not-yet-finished computation that will be available in future. Spring MVC uses it to represent asynchronous computation and take advantage of Servlet 3.0 AsyncContext asynchronous request handling. Just to give a quick impression how it works:               @RequestMapping("/") @ResponseBody public DeferredResult<String> square() throws JMSException { final DeferredResult<String> deferredResult = ...

Read More »

Spring MVC 3: Upload multiple files

spring-interview-questions-answers

It was just another long day at office with the database not available and one of the team members lagging by a week now. So, we had to work as a team to get it delivered. In Spring 3, it looked straight forward to upload a file. However, there was little help on offer, to upload multiple files from a ...

Read More »

Spring MVC – Customizing RequestMappingHandlerMapping

spring-interview-questions-answers

When Spring MVC is configured using <mvc:annotation-driven/> in an xml bean definition file, internally a component called RequestMappingHandlerMapping gets registered with Spring MVC. This component or in general a HandlerMapping component is responsible for routing request URI’s to handlers which are the controller methods annotated with @RequestMapping annotation.               There are two specific configurations ...

Read More »

A Guide To Authenticating Users With Mozilla Persona

mozilla-persona-logo

Having only twitter and facebook authentication so far, I decided to add Mozilla Persona to the list for my latest project (computoser, computer-generated music). Why?                 I like trying new things Storing passwords is a tough process, and even though I know how to do it, and even have most of the code ...

Read More »

Spring’s Web MVC – Redirect to the Memory Leak

spring-interview-questions-answers

They say that one rock can cause an avalanche. Lately, one of my Colleagues, Marcin Radoszewski, gave me such a rock. You’ll probably never guess what it is, but there is a chance, that you use it in many of your Web Applications. Allow me to introduce this rock to you. You probably well know redirect after post pattern. Using ...

Read More »

Use reCaptcha in a Spring MVC web application

spring-security-logo

A CAPTCHA is a program that can generate and grade tests that humans can pass but computer programs ‘cannot‘. One of strategies followed are showing an image to user with distorted text, and user should write text in input area. If showed text is the same as input by user, then we can ‘assure‘ that a human is on computer. A captcha ...

Read More »

Spring MVC REST Calls With Ajax

spring-interview-questions-answers

This post provides a simple example of REST calls to a Spring MVC web application. It is based on the Serving Static Resources With Spring MVC and Fetching JSON With Ajax In Spring MVC Context example. The code is  available on GitHub in the Spring-REST-With-Ajax directory. Main Page Our main page contains four buttons linked to Javascript functions performing Ajax calls:       ...

Read More »
Do you want to know how to develop your skillset and become a ...

Subscribe to our newsletter to start Rocking right now!

To get you started we give you our best selling eBooks for FREE!
Get ready to Rock!
To download the books, please verify your email address by following the instructions found on the email we just sent you.

THANK YOU!

Close