
Content Negotiation using Views
In my previous post I introduced the concept of content negotiation and the three strategies Spring MVC uses to determine the content requested. In this post I want to extend the concept to supporting multiple views for different content-types using the ContentNegotiatingViewResolver (or CNVR). Quick Overview Since we already know how to setup content-negotiation from Read more…

Spring Framework 4.0 M1: WebSocket Support
As you may have seen, the first milestone of Spring Framework 4.0 was already announced and with it we've released early WebSocket support. Why WebSocket matters? It enables efficient, two-way communication over the web that is essential in applications where messages need to be exchanged between client (typically browser) and server at high frequency and Read more…

Content Negotiation using Spring MVC
There are two ways to generate output using Spring MVC: You can use the RESTful @ResponseBody approach and HTTP message converters, typically to return data-formats like JSON or XML. Programmatic clients, mobile apps and AJAX enabled browsers are the usual clients. Alternatively you may use view resolution. Although views are perfectly capable of generating JSON Read more…
Bringing new life to Spring Travel with Thymeleaf
Hi reader! My name is Daniel Fernández and I am the author of the Thymeleaf template engine as well as several other open source technologies. I recently helped update the Spring Travel sample application and migrate its view layer to Thymeleaf, and the nice folks at SpringSource have given me the opportunity to write Read more…

Simple templates for the Scripted Editor
One of the major goals of Scripted Editor 0.4 is extensibility. We recently released 0.3 and we are making fast progress towards 0.4. Part of the extensibility story is simple declarative extensions to editor functionality (the other part is a powerful plugin model, which will be described in a future blog post). In this blog post, I will introduce custom code completions and templates for the Scripted editor.

Spring Framework 3.2 RC1: Spring MVC Test Framework
Update Dec 19, 2012 The final Spring Framework reference documentation contains guidance on migration as well as a complete section on Spring MVC Test. Last week Juergen Hoeller announced the release of Spring Framework 3.2 RC1 and Sam Brannen discussed exciting additions in its spring-test module such as support for WebApplicationContext's and upcoming plans for Read more…

Spring Framework 3.2 RC1: New Testing Features
As Juergen Hoeller mentioned in his post announcing the release of Spring Framework 3.2 RC1, the Spring Team has introduced some exciting new features in terms of testing support. Most importantly, we've added first-class support for testing web applications. [1] Please note: this is a cross post from my Swiftmind company blog. In this post Read more…

Spring MVC: from JSP and Tiles to Thymeleaf
When it comes to the view layer, Spring @MVC gives you a variety of choices. In this article, we will first discuss the way you have most likely used the view layer in the past few years: JSP. We will see the bad and better ways to work with them (plain JSP, JSP with custom Read more…

Integrating Spring MVC with jQuery for validation rules
I was thrilled to see in a recent survey from zeroturnaround that Spring MVC was voted the most popular web framework for Java. This framework is very flexible and there are dozens of ways to use it. As with all flexible frameworks that have many options, it is important to discuss common practices. The project Read more…

Spring MVC 3.2 Preview: Chat Sample
Last updated on November 5th, 2012 (Spring MVC 3.2 RC1) In previous blog posts I introduced the Servlet 3 based async capability in Spring MVC 3.2 and used the spring-mvc-showcase and the Spring AMQP stocks sample to demonstrate it. This post presents a chat sample where the external events are not AMQP messages but rather Read more…

