Posts

Showing posts from April, 2013

Spring MVC @PathVariable Tips

@PathVariable annotation is one of the Spring MVC features that allows creating RESTful Web application much easier. It indicates that a handler method parameter should be bound to a URI template. In this post I will present two useful tips for working with this annotation.

HOW-TO: Custom error pages in Tomcat with Spring MVC

Default Tomcat error pages look scary. In addition, they may expose valuable information including server version and exception stack trace. Servlet specification provides a way to configure an exceptional behavior through web.xml. One can configure either reaction on a specific Java exception or to a selected Http response code(s).