Jsp新手问题 请大家帮忙

wchm 2003-09-22 08:33:13
我用的是tomcat 4.1.24
在JSP文件中用到Bean,即类AccessTest,出现如下错误,但类编译通过,问提出在哪里
?急急急,谢谢!!!
exception
org.apache.jasper.JasperException: Unable to compile class for JSP
An error occurred at line: -1 in the jsp file: null
Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] F:\software\java\tomcat\jakarta-tomcat-4.1.24\work\Standalone\lo
calhost\myjsp\testBeanEx_jsp.java:43: cannot resolve symbol
[javac] symbol : class AccessTest
[javac] location: class org.apache.jsp.testBeanEx_jsp
[javac] AccessTest atest = null;
[javac] ^
[javac] F:\software\java\tomcat\jakarta-tomcat-4.1.24\work\Standalone\lo
calhost\myjsp\testBeanEx_jsp.java:45: cannot resolve symbol
[javac] symbol : class AccessTest
[javac] location: class org.apache.jsp.testBeanEx_jsp

[javac] F:\software\java\tomcat\jakarta-tomcat-4.1.24\work\Standalone\lo
calhost\myjsp\testBeanEx_jsp.java:45: cannot resolve symbol
[javac] symbol : class AccessTest
[javac] location: class org.apache.jsp.testBeanEx_jsp
[javac] atest = (AccessTest) pageContext.getAttribute("atest", P
ageContext.PAGE_SCOPE);
[javac] ^
[javac] F:\software\java\tomcat\jakarta-tomcat-4.1.24\work\Standalone\lo
calhost\myjsp\testBeanEx_jsp.java:48: cannot resolve symbol
[javac] symbol : class AccessTest
[javac] location: class org.apache.jsp.testBeanEx_jsp
[javac] atest = (AccessTest) java.beans.Beans.instantiate(th
is.getClass().getClassLoader(), "AccessTest");
[javac] ^
[javac] F:\software\java\tomcat\jakarta-tomcat-4.1.24\work\Standalone\lo
calhost\myjsp\testBeanEx_jsp.java:66: cannot resolve symbol
[javac] symbol : class AccessTest
[javac] location: class org.apache.jsp.testBeanEx_jsp
[javac] out.print(JspRuntimeLibrary.toString((((AccessTest)pageCon
text.findAttribute("atest")).getUser())));
[javac] ^
[javac]
[javac] 4 errors ^
...全文
10 点赞 收藏 1
写回复
1 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
seaman0916 2003-09-22
[javac] F:\software\java\tomcat\jakarta-tomcat-4.1.24\work\Standalone\lo
calhost\myjsp\testBeanEx_jsp.java:43: cannot resolve symbol
[javac] symbol : class AccessTest
[javac] location: class org.apache.jsp.testBeanEx_jsp
[javac] AccessTest atest = null;
[javac] ^

说明你的类定义! 你可以通过import 这个javabean或是使用 <jsp:usebean=""......./>的方式定义这个类对象!
回复
相关推荐
发帖
Web 开发
创建于2007-09-28

8.0w+

社区成员

Java Web 开发
申请成为版主
帖子事件
创建了帖子
2003-09-22 08:33
社区公告
暂无公告