import java.util.Map.Entry;
private static Map oldvote=new HashMap();
...............................
ModelAndView mav = new ModelAndView();
String voteid = ServletRequestUtils.getRequiredStringParameter(request,
"voteid");
String ip = ServletRequestUtils.getStringParameter(request, "ip");
//遍历HasMap
Boolean isoldvote=false;
Iterator it=oldvote.entrySet().iterator();
while(it.hasNext()){
Entry entry=(Entry) it.next();
Object key=entry.getKey();
Object value=entry.getValue();
if(key.equals(voteid)&&value.equals(ip)){
isoldvote=true;
break;
}
}
if (isoldvote) {
...............................
posted on 2007-04-14 09:41
摩西 阅读(362)
评论(0) 编辑 收藏 所属分类:
work_2007