当前位置: 代码迷 >> Java Web开发 >> Only a type can be imported. com.SimpleBean resolves to a package
  详细解决方案

Only a type can be imported. com.SimpleBean resolves to a package

热度:1196   发布时间:2016-04-17 10:24:52.0
jsp编译有错,请高手指点啊

An error occurred at line: 6 in the generated java file
Only a type can be imported. com.SimpleBean resolves to a package

An error occurred at line: 10 in the jsp file: /WebTest/WebRoot/JavaBean/SimpleBean.jsp
SimpleBean cannot be resolved to a type
7:  
8: <body>
9: <%
10: SimpleBean simple = new SimpleBean();
11: simple.setName("wang");
12: simple.setAge("21");
13: %>


------解决方案--------------------
没有引入SimpleBean类!
------解决方案--------------------
<%page import=
------解决方案--------------------
<%@page import="SimpleBean的全类名"%>
引入SimpleBean
------解决方案--------------------
请先引入com.SimpleBean包。。。
------解决方案--------------------
嗯,引入SimpleBean
------解决方案--------------------
在前面用<%@page import="SimpleBean的全类名"%>来导入这个类,它所在的包一定要对哦。

------解决方案--------------------
SimpleBean这个类的包引入看看!
------解决方案--------------------
要导包把<%@page import= %>
------解决方案--------------------
需要引入
  相关解决方案