add i < resultlist.size()
change web.xml to 3.0