Java code for web