Loading Java Properties from file
Normally, Java properties file is used to store project configuration data or settings. In this tutorial, we will show you how to read and write to/from a properties file.
Filter vs Listener
This article briefly shows the main differences between Filter an Listener in Java. Servlet Filter Filter is an object which transform the request and response (header as well as content). Servlet Filter is used for manipulating the request and response from client to…
Setting up a datasource with Spring
In this article we will see how to access a database using JDBC and Spring. In JDBC 2.0 or higher, you can obtain database connections from a preconfigured javax.sql.DataSource object without knowing about the connection details. On the other hand,…
Publishing a REST services with Spring
In this article we will see how to implement a REST services with Spring with a classic example…the Employees!! We’ll see a simple application that manages a list of employees and exposes three web services: GetEmployes GetEmployees AddEmployee
Make servlets with Spring
In this post we will see how to define a simple servlet with Spring framework. We will use as simple example of an application that calculate the distance betweed two cities and shows the results in a JSP page.
Introduction to Spring Framework
Spring is the most popular application development framework for enterprise Java. It’s very popular to create high performing, easily testable, reusable code without any lock-in. The main princible behind Spring is the Inversion of Control (IoC). In software engineering, Inversion…
Define a custom Servlet Context Listener
Before going into the details of ServletContextListener we should understand what is ServletContext. ServletContext is a interface which helps us to communicate with the servlet container. There is only one ServletContext for the entire web application and the components of…
Hot-reload of properties file
In this post we’ll see how to do hot-reload of properties file used by a web-application. Hot-reload is useful when we want change some property in a file without restart the application server (like JBoss). Restart an application-server (or servlet-container)…