Tag Archives: Java

JPackage – Yum Repositories for CentOS, Fedora and Redhat

The default CentOS repository is quite old and i cannot find what i need. The JPackage Project is designed for providing up-to-date java packages for Linux user. Please refer to the JPackage Official Website for more details.
Continue reading JPackage – Yum Repositories for CentOS, Fedora and Redhat

Java – Date validation using SimpleDateFormat

I need to write a program which reads a date string. The program then archives all the data on the server with the input date as an cut off date.

The following java program is based on the tutorial in </dream.in.code>. It reads a date string, validate it and print the number of date difference between today and the input date.
Continue reading Java – Date validation using SimpleDateFormat

Java – Get the content of inputStream from HttpServletRequest

Recently, i got a support case and it is about the inconsistency of the content length declared in the http header and the actual content length of the http request.

So i modified an existing program which will get the http request and manipulate it. I add some codes such that it will get the request inputStream and count it byte by byte before the request manipulation.
Continue reading Java – Get the content of inputStream from HttpServletRequest

Maven + SVN + CruiseControl @ 1

The need of management is always true everywhere — a company, an application as well as yourself. As a programmer. i have been involved in some messy IT projects which have no management at all. Actually this is very common in HK where local companies only want you to complete the tasks before deadline. In such a busy city, seems that quality means nothing and changes come everyday.
Continue reading Maven + SVN + CruiseControl @ 1

JDBC – Java Database Connectivity @ 1

JDBC is an API for Java and it defines how your Java application make connection to the database in order to query or update the data.

In the following example, it shows you how to get a value from the database using the JDBC API. To make use of the API, you have to download the JDBC driver of your database. Postgresql Database is used in this example. so the postgresql-8.4-701.jdbc3.jar is added to the eclipse project.
Continue reading JDBC – Java Database Connectivity @ 1