错误是:
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 30 in the jsp file: /ModPro.jsp
DBConnect cannot be resolved to a type
27: </head>
28:
29: <body>
30: <jsp:useBean id="con" scope="page" class="DBConnect" />
31: <%
32: ResultSet rs;
33: String sql = "select * from goods";
解决方法:
这个类放在一个包里面 应用 就不会出这个错了

本文介绍了一种在Java Server Pages (JSP) 开发中遇到的常见错误 'DBConnect cannot be resolved to a type' 的解决方案。该问题通常发生在尝试使用未正确声明的类时。文章详细说明了错误发生的上下文,并提供了一个简单的解决办法,即确保引用的类被正确放置在应用的包结构中。
761





