各位大侠,
小弟有事求教,
在使用TOMCAT的JSP的开发中,JAVABEAN应该是放在ROOT/WEB/INI/CLASSES文件夹下的吧?
为什么我是这样作的,却得出错误的结果呢:
我的CLASSPATH设置都是正确的。
可以运行SERVLET和不涉及JAVABEAN的JSP;
但当我在JSP网页中使用JAVABEAN时,就会出现上述错误。
我编译的JAVABEAN为a.Testq
Testq.class放在ROOT/WEB-INF/CLASSES/a目录下,
我的JSP文件名为3.jsp。内容很简单,就是一条语句而已
<jsp:useBean class="a.Testq" id="test" scope="application"/>
IE中键入http://localhost:8080/3.jsp
错误如下:
HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: /3.jsp(1,1) The value for the useBean class attribute a.Testq is invalid.
请各位高手指点迷津,小弟感激不尽啊!
小弟有事求教,
在使用TOMCAT的JSP的开发中,JAVABEAN应该是放在ROOT/WEB/INI/CLASSES文件夹下的吧?
为什么我是这样作的,却得出错误的结果呢:
我的CLASSPATH设置都是正确的。
可以运行SERVLET和不涉及JAVABEAN的JSP;
但当我在JSP网页中使用JAVABEAN时,就会出现上述错误。
我编译的JAVABEAN为a.Testq
Testq.class放在ROOT/WEB-INF/CLASSES/a目录下,
我的JSP文件名为3.jsp。内容很简单,就是一条语句而已
<jsp:useBean class="a.Testq" id="test" scope="application"/>
IE中键入http://localhost:8080/3.jsp
错误如下:
HTTP Status 500 - --------------------------------------------------------------------------------type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: /3.jsp(1,1) The value for the useBean class attribute a.Testq is invalid.
请各位高手指点迷津,小弟感激不尽啊!
http://www.family168.com/tutorial/jsp/html/jsp-ch-05.html
这个调用的正确吗