he method setAttribute(String,object)in the type HttpSession is not appl
2016-11-28 15:14
471 查看
这个错误的意思是你在绑定的时候,绑定的值不是一个Object,产生这个问题的原因主要是JDK版本的问题。有的JDK版本,是支持直接从int转换为Integer,编译可以通过。你的JDK应该不支持这个。解决的办法有两个:
方案一:忽略掉JDK版本,比如你原来是session.setAttribute("count",count);,count是int类型, 那你可以采用Integer countObj = Integer.valueOf(count);这样,在绑 定:session.setAttribute("countObj",countObj);
方案二:项目文件夹,右键,properties,Java Compiler 修改Compiler compliance lever 为1.6
方案一:忽略掉JDK版本,比如你原来是session.setAttribute("count",count);,count是int类型, 那你可以采用Integer countObj = Integer.valueOf(count);这样,在绑 定:session.setAttribute("countObj",countObj);
方案二:项目文件夹,右键,properties,Java Compiler 修改Compiler compliance lever 为1.6
相关文章推荐
- The method setItems(String) in the type ForTokensTag is not applicable for the arguments (Object)
- The method setValue(String) in the type ParamTag is not applicable for the arguments (long)
- c:forTokens 报错 The method setItems(String) in the type ForTokensTag is not applicable for the argume
- Eclipse中使用printf报错 提示参数类型不对 已解决The method printf(String, Object[]) in the type PrintStream is not ap
- Error:The method setInputPaths(JobConf, String) in the type FileInputFormat is not
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- The method setCharacterEncoding(String) is undefined for the type HttpServletResponse 是什么原因?
- 解决-The method setOnClickListener(View.OnClickListener) in the type View is not 错误
- 报错 The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the ar
- The method setClass(Context, Class<?>) in the type Intent is not applicable for the问题
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable
- The method replace(int, Fragment, String) in the type FragmentTransaction is not applicable for the arguments (int, SettingFragment, String)
- The method getValue(String) from the type HttpSession is deprecated
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable
- The method setBackground(Drawable) in the type View is not applicable for the arguments (int)
- The method setClass(Context, Class<?>) in the type Intent is not applicable for the arguments (GameV
- The method setOnClickListener(View.OnClickListener) in the type View is not applicable for the argum
- The method setStatus(int) in the type Goods is not applicable for the arguments (Integer)
- The method setOnClickListener(View.OnClickListener) in the type View is not