Expression Language in Thymeleaf


In my previous tutorial I have explained about the simple hello world example to start writing your first example using the Thymeleaf framework. If you are not familiar with this new framework, I would recommend to read that tutorial before start reading this tutorial. When we work with web frameworks, one of the important feature […]

WebContext in Thymeleaf


In my previous tutorial I have explained about writing your first Hello World example using Thymeleaf template engine framework. If you look at the example, it uses some kind of context to transfer the variables across its application. The same way how ServletContext or SpringApplicationContext works, Thymeleaf has its own context framework to maintain its […]

java.lang.ClassNotFoundException: javassist.ClassPath


When you work with Hibernate or Thymeleaf, it is probably that you would get the below exception. It may happen any other projects too if that library has the dependency with javaassist library. I have got this exception when I started developing my first Hello World application using Thymeleaf template framework. The reason for the […]

Thymeleaf Hello World Example


This tutorial is Hello World example for the template engine framework Thymeleaf. This framework is released few years back and many projects adopted this template engine framework. In simple terms, Thymeleaf is a Java library which can be easily integrated to any Java applications or frameworks like Spring to use as the view templates. Thymeleaf […]

Spring Best Practices & Cloud Foundry Event in Bangalore : Free


This week’s Spring team is conducting a free session on the topic Spring Best Practices and Cloud Foundry. Normally these session are not free for the users. This time, they are offering for free f cost. The seats are limited and will be filled up very soon since this offering is free. If you are […]

@ControllerAdvice Improvements in Spring 4.0


In my earlier article I have explained about the usage of @ControllerAdvice¬†which is introduced from the Spring 3.2 release. It is special type of @Component to declare the global exceptions handler. When you create a class with @ControllerAdvice and then write few methods with the @ExceptionHandler annotations, any exception thrown in the application will be […]

Spring 4.0 Environment Setup


This tutorial explains how to setup your environment for working with the Spring 4.0 examples. Instead of explaining this process in every article, I would write it here so that this tutorial will be linked from the all Spring 4.0 tutorials for the setup reference. Spring 4.0 Maven Dependency At this time of writing this […]

RestController in Spring 4.0


We are curiously waiting for the release of Spring 4.0 (Update : Spring 4.0 Released). This new version comes up with lot of exciting new features. One of the API improvements is new @RestController annotation which is inherited from the @Controller annotation. Prior to the version 4.0, all the Spring MVC components has to use […]

Spring 3 and JSR-330 Annotation : @Named and @Component Difference


@Named and @Component annotations are used for the same purpose. Both the annotations are used for enabling a class to be auto detected as the bean definition for spring’s application context. The following are the main different of these two annotations. @Named is part of the. Java specification. It is more recommended since this annotation […]

Spring Bean Factory Exception : BeanFactory not initialized or already closed


The given exception is exception is thrown when the spring bean factory is not initialized properly before it is used in your application. It normally occurs when we are not added the bean factory initialization code in our project. One typical example is adding the spring initialization parameter to web.xml deployment descriptor. Exception Trace: