日期:2014-05-18  浏览次数:20688 次

请教javebean+tomcat+jsp的一个错误???是怎么回事
请教javebean+tomcat+jsp的一个错误???是怎么回事
IE页显示如下错误
org.apache.jasper.JasperException:   Unable   to   compile   class   for   JSP:  

An   error   occurred   at   line:   4   in   the   jsp   file:   /login.jsp
DispUsers   cannot   be   resolved   to   a   type
1:   <%@   page   contentType= "text/html;charset=gb2312 "   %>
2:   <%request.setCharacterEncoding( "gb2312 ");%>    
3:   <%@   include   file= "incdb.jsp "%>
4:   <%
5:   String   post=request.getParameter( "POST ");//取得表单的传值,name为POST的表单(hidden)
6:   String   action= "True ";
7:   if(post!=null&&post.equals(action))//如果post值不为空且等于action

------解决方案--------------------
可能 是你的incdb.jsp 和 javabean 出错了
------解决方案--------------------
说个笨点的办法...try catch <body> 中的东西 让他把异常抛了 在找会比较好点~~
------解决方案--------------------
<%@ include file= "incdb.jsp "%>
这个引用需要加入相对地址,应该是找不到这个jsp页面造成的。
我的异常网推荐解决方案:org.apache.jasper.JasperException: Unable to compile class,http://www.aiyiweb.com/j2ee/2308.html