请教各位高人一个简单的关于javabean的问题

peiwu peiwu 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
我用tomcat做了一个javabean,用<jsp:usebean……>制订了一个bean,可是编译时总是提示找不到,为什么?这个东西和路径的大小写有关系吗?

具体设置如下:
*.jsp文件的位置:<##%%tomcat%%##>/webapps/root/test/test.jsp
*.class文件的位置:<##%%tomcat%%##>/webapps/root/test/web-inf/classes/test/test.class

调用语句是:<jsp:useBean id="firstbean" scope="page" class="test.test"/>

我的*.class是
package test;
import java.sql.*;
public class test
{……
……
……
}


调试报的错误是:
org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.


An error occurred at line: 3 in the jsp file: /test/TMP2a8sjczcef.jsp

Generated servlet error:
F:\tomcat\work\Standalone\localhost\_\test\TMP2a8sjczcef$jsp.java:61: Class test.test not found.
test.test firstbean = null;
...全文

相关推荐

评论 6
收藏 已收藏
分享
返回顶部
peiwu
Web 开发 81,108 成员 341,721 内容