write some useful utils for java web