Servlet

Tracking HTTP Session by using HttpSessionListener

In web application, sometimes we need to track existing sessions on server, for example we need to get actual HTTP session from session ID. Following I will show you simple HTTP session listener to keep existing sessions during creation time, then get stored session based on session ID. Below sample code will store valid sessions into memory for debugging and …

gzip

Enable Gzip compression in Apache Tomcat

What is Gzip?

Gzip is a software application used for file compression and decompression. The program was created by Jean-Loup Gailly and Mark Adler as a free software replacement for the compress program used in early Unix systems, and intended for use by the GNU Project (the “g” is from “GNU”). Version 0.1 was first publicly released on 31 October …

web

Simple Web Cache Filter in Java

As you know, Internet browser has feature to cache all static files like images, Javascript, and CSS. This cache is very useful to reduce network latency when the browser requesting data from Web server. Before the browser do request to Web server, it will check first on its local cache, if the file is not there, expired, or not same …