怎么不行啊??? exception org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: 2 in the jsp file: /numguess.jspGenerated servlet error: [javac] Compiling 1 source fileC:\Tomcat 4.1\work\Standalone\localhost\_\numguess_jsp.java:7: package num does not exist import num.NumberGuessBean; ^ C:\Tomcat 4.1\work\Standalone\localhost\_\numguess_jsp.java:44: package num does not exist num.NumberGuessBean numguess = null; ^An error occurred at line: 2 in the jsp file: /numguess.jspGenerated servlet error: C:\Tomcat 4.1\work\Standalone\localhost\_\numguess_jsp.java:46: package num does not exist numguess = (num.NumberGuessBean) pageContext.getAttribute("numguess", PageContext.SESSION_SCOPE); ^An error occurred at line: 2 in the jsp file: /numguess.jspGenerated servlet error: C:\Tomcat 4.1\work\Standalone\localhost\_\numguess_jsp.java:49: package num does not exist numguess = (num.NumberGuessBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "num.NumberGuessBean"); ^ 4 errors还是有这个错误啊。。 为什么啊
package num does not exist 没有包,先建立一个num目录,然后把.java文件编译成.class
我的jsp发布是在C:\Tomcat 4.1\webapps\ROOT中,
我问的是javabean放在什么地方啊,还是在root文件家里吗??
我的jsp发布是在C:\Tomcat 4.1\webapps\ROOT中,
我问的是javabean放在什么地方啊,还是在root文件家里吗??
---------------------------------------------
ROOT/WEB-INF/classes/
exception org.apache.jasper.JasperException: Unable to compile class for JSPAn error occurred at line: 2 in the jsp file: /numguess.jspGenerated servlet error:
[javac] Compiling 1 source fileC:\Tomcat 4.1\work\Standalone\localhost\_\numguess_jsp.java:7: package num does not exist
import num.NumberGuessBean;
^
C:\Tomcat 4.1\work\Standalone\localhost\_\numguess_jsp.java:44: package num does not exist
num.NumberGuessBean numguess = null;
^An error occurred at line: 2 in the jsp file: /numguess.jspGenerated servlet error:
C:\Tomcat 4.1\work\Standalone\localhost\_\numguess_jsp.java:46: package num does not exist
numguess = (num.NumberGuessBean) pageContext.getAttribute("numguess", PageContext.SESSION_SCOPE);
^An error occurred at line: 2 in the jsp file: /numguess.jspGenerated servlet error:
C:\Tomcat 4.1\work\Standalone\localhost\_\numguess_jsp.java:49: package num does not exist
numguess = (num.NumberGuessBean) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "num.NumberGuessBean");
^
4 errors还是有这个错误啊。。
为什么啊
没有包,先建立一个num目录,然后把.java文件编译成.class