Search This Blog

Wednesday 20 January 2016

Servlet 3.x - Building the web.xml less Web Application

Ever since Java introduced  annotations, every framework has been looking to provide an XML alternative to their configuration information. So how could servlets be left behind.

Saturday 16 January 2016

try with resource - dealing with failures

In the previous post we saw the try-with-resource statements and how the execution flows. Here I decided to look at the java.sql.Connection class which also implements the AutoCloseable interface.

Wednesday 6 January 2016

Java Streams

We have been exploring Lambda expressions and Functional Interfaces in the past few posts. Now is the time to move to a related new  feature called Streams.

try with resource

I have often used the try-with-resources Statement that was introduced in Java 7. Today I decided to look a little deep into it.
In earlier versions of java when dealing with resources that need closing, the code something like below: