ReCaptcha login form with Spring Security

Today I’ll show you how to customize Spring Security to create a login form with ReCaptcha verification

The captcha is based on Google ReCaptcha plugin. More info on ReCaptcha here

Read more of this post


GWT RPC integration with Spring

Recently I started studying GWT, a new web framework for my curriculum. The main idea of GWT is to let you code the GUI part in Java (with static compilation and type checking) then translate this code into Javascript.

For the backend, GWT relies on an RPC system using plain old Servlet. Each RPC service is published as a distinct servlet so you end up having as many servlets are there are distinct RPC services.

Not only this approach is not optimal for resources management server-side wise, it also pollutes your web.xml with many servlet declarations.

Ideally we should have an unique servlet serving as a router and dispatching RPC calls to appropriate service beans managed by Spring. Spring is an appropriate framework for managing business in the backend due to its industry-wide adoption and its mature extensions portfolio. Needless to say that this design can be easily adapted for JEE containers too.

Disclaimer: the code presented below has been inspired from projects like spring4GWT and gwtrpc-spring. I took the same approach and modified the URL mapping part so the original credits go for them.

Read more of this post

Cache abstraction in Spring 3

In this article we’ll have a look at the new Spring 3 feature: caching by annotation.

Read more of this post

Spring MVC part V: Exception handling

Today we’ll dig into the exception handling mechanism of Spring MVC 3.1

Read more of this post

Spring Security part VI : Session Timeout handling for Ajax calls

Recently when developing the Tatami application for the Twitter-like contest, I faced an annoying issue: how to detect an user session timeout when an Ajax request is triggered from the browser ?

If you’re not familiar yet with Spring Security, you can check my previous articles on this framework.

In this article we’ll see a solution based on Spring Security filter. For those who don’t use Spring Security I’ll show another approach with servlet filter.

Read more of this post

Spring MVC part IV: ThymeLeaf advanced usage

This post follows on from the previous post on Thymeleaf integration with Spring MVC.

Today we’ll look at some advanced features of Thymeleaf

Read more of this post

Spring MVC part III: ThymeLeaf integration

Today we are going to look into Thymeleaf, a very innovative and full HTML5-oriented templating engine.

Thymeleaf, by definition, can be used as a standalone engine but when associated with Spring MVC, it gives the best of its essence.

Once you start using Thymeleaf, it’s very hard to go back to the good old JSP. JSP is good, JSP served us well during a decade but now we’re in 2012 and HTML 5 is the future so it’s time to look ahead.
Read more of this post