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 …

Eclipse Juno

Chrome Theme: Tweak Your Ugly Eclipse Juno Look and Feel

Is Eclipse your favorite IDE for Java? If so, then maybe this article will be useful for you. After I migrated to Eclipse Juno, I noticed that the default theme of Eclipse Juno so ugly. See the screenshot of Eclipse Juno’s default theme below:

Eclipse Juno's default theme

Look and feel is something important for me. If the theme is ugly, how can I …

Tibco

How to reset TIBCO EMS Administrator password

If the EMS admin password has been lost, it is easy to recover. In EMS all local users and their passwords stored in the users.conf file by default. You can find correct file in the tibemsd.conf (mine is under /opt/tibco_cfg/tibco/cfgmgmt/ems/data):

In the users.conf find admin user:

and remove …

Oracle Java

How to mapping Java objects in simple way?

In some projects, I faced a problem that I have to mapping some attributes of an object to other object. One time, I need to mapping less than 10 attributes. But in other time, I need to mapping more than 50 attributes. Of course, this is very painful thing that has to be done.

After ‘googling’ for sometime, finally I …

Oracle Java

Loop a Map object in Java

This article actually is very basic things in Java, but based on my experiences, even a good Java developers also need this. I will never remember the code how to loop a Map object in Java. That’s why I logged it here, for me, and of course also for you. Feel free to copy, and use it on your code.…

Flat File

Painless Flat File Parsing with BeanIO

Do you have any experiences to read formatted flat file, like CSV? Or maybe you want to migrate data from formatted file with header and footer exported by other system? Please take a look into below example of flat file, and you will have any question how to read this file in Java:

Oracle Java

Debugging Java object with Reflection

When we instantiate new object in Java, sometime we wanna know what is actually that object? Or maybe you wanna know the value of all properties inside? Or the parent of that object?

This is a very basic questions of Java developers in the world. Actually we can use a feature in Java, so called Reflection. If you use this …