当前位置: 代码迷 >> Java Web开发 >> jsp中的useBean有关问题
  详细解决方案

jsp中的useBean有关问题

热度:66   发布时间:2016-04-17 15:58:31.0
求助jsp中的useBean问题
出现这样的问题,各位大侠帮帮忙
org.apache.jasper.JasperException:   Unable   to   compile   class   for   JSP:  


An   error   occurred   at   line:   9   in   the   jsp   file:   /scope_page.jsp
compare   cannot   be   resolved
6:   <div   align= "center ">
7:   <JSP:useBean   id= "compare "   scope= "session "   class= "compare_scope "/>
8:   <hr>
9:   <%=compare.getscopeType()%> <br>
10:   <%compare.setscopeType( "request ");%>
11:   <hr>
12:   </div> </body>


An   error   occurred   at   line:   10   in   the   jsp   file:   /scope_page.jsp
compare   cannot   be   resolved
7:   <JSP:useBean   id= "compare "   scope= "session "   class= "compare_scope "/>
8:   <hr>
9:   <%=compare.getscopeType()%> <br>
10:   <%compare.setscopeType( "request ");%>
11:   <hr>
12:   </div> </body>
13:   </html>

------解决方案--------------------
<jsp:useBean id= " " class= " " >

应该这么写吧

而且class 还必须要有包结构
代码迷推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.daimami.com/search?q=2308
  相关解决方案