Motivation

Jtwig integration with Spring Web MVC supports template caching which allows one to speed up the rendering. Specially in the case of high usage of include and extends tags. Caching allows one to skip the file system access (to read the template) and it also skips the creation of the final structure of the template resolving all the extends, blocks and include tags, which increases the access to the file system.

February 16, 2014 Java, Jtwig, Spring MVC, Webapp

Motivation

Some browsers, to resolve the content encoding, use a specific header field named “Content Type“. Spring Web MVC sends a default value, which if not changed, could result in the browser rendering the output with a wrong encoding, even if one specify the value in HTML meta tags.

Some may think that this is a template engine issue, however, that’s not the way Spring works. Here I’ll show you how to change it properly.

February 15, 2014 Java, Jtwig, Webapp

ThreadLocal, what an useful class. I’ve used it several times, I know what it allows me to do, but yet I don’t know how it is, actually, implemented, so in detail, what does it offers me?

February 12, 2014 Concurrency, Java