By compressing javascript files page loading time is significantly reduced. Below I've wrote an ant task that can be used in a build file of a project to compress javascript source files.
The goal of Project Phobos is to show that Java is an excellent platform for server-side scripting, allowing dynamic-language developers to leverage the power of Java SE and EE. The initial focus for Project Phobos is JavaScript, but the design supports t