split the js and java code.
can run the client program on apache server now.