为什么有的action里这个不报错,有的地方要报错
报错:the methd setAttribute(String ,Object) in the type servletRequest is not applicable for the arguments(String,int)
报错:the methd setAttribute(String ,Object) in the type servletRequest is not applicable for the arguments(String,int)
这句花是可以独立的
我就是不明白为什么有些可以,和servlet类库有关还是和java库有关
是不是新的类库重写了这个类,有(String,int)了
JDK1.4不行,换了1.5好象也不对
感觉是JDK 的问题
set的int get也要int
set的int get也要int
int regok = Integer.parseInt((String)request.getAttribute("regok"));
set的int get也要int如果没有赋值,就抛异常了
request.setAttribute("regok",1);.....
Integer regok = (Integer)request.getAttriute("regok");
if(regok==null || regok!=1){
.... // 没有注册
}
有的不出错有的就出错
The method setAttribute(String, Object) in the type ServletRequest is not applicable for the arguments (String, int)