updated web and java code