请教各位高人一个简单的关于javabean的问题
peiwu 2003-04-07 11:46:15 我用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;