change ‘head’ in registerservlet.java to null