Editing graph using html javascript(client side) and jsp(server side)