还是不行!! 报错: A Servlet Exception Has Occurredorg.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.An error occurred at line: 2 in the jsp file: /agui/login.jsp Generated servlet error: D:\tomcat4.0\work\localhost\_\agui\login$jsp.java:60: Class org.apache.jsp.test not found. test test1 = null; ^ An error occurred at line: 2 in the jsp file: /agui/login.jspGenerated servlet error: D:\tomcat4.0\work\localhost\_\agui\login$jsp.java:63: Class org.apache.jsp.test not found. test1= (test) ^ An error occurred at line: 2 in the jsp file: /agui/login.jsp.......
default path:tomcat\webpags\examples\jsp\webinf\class you can change it at server.xml and other you can put it at tomcat\lib\*.classand if you use tomcat you'd better resert you server
本人的.html和.jsp放在root/agui下,
.java .class 放在 root/web_inf/classes下,
运行还是不行。所用.jsp文件,如下:
<jsp:useBean id="test1" class="test" scope="page"/>
<%@ page contentType="text/html;charset=gb2312" %>
<%
int i=1;
if(i ==1)
response.sendRedirect("index.jsp?job=1");
else
response.sendRedirect("error1.jsp?id=" + i);
%>所用.java文件如下:
class test{
int m=5;
String n="str";
}
到底错在那里??
报错:
A Servlet Exception Has Occurredorg.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated.An error occurred at line: 2 in the jsp file: /agui/login.jsp
Generated servlet error:
D:\tomcat4.0\work\localhost\_\agui\login$jsp.java:60: Class org.apache.jsp.test not found.
test test1 = null;
^
An error occurred at line: 2 in the jsp file: /agui/login.jspGenerated servlet error:
D:\tomcat4.0\work\localhost\_\agui\login$jsp.java:63: Class org.apache.jsp.test not found.
test1= (test)
^
An error occurred at line: 2 in the jsp file: /agui/login.jsp.......
you can change it at server.xml
and other you can put it at tomcat\lib\*.classand if you use tomcat you'd better resert you server
如果有,你就要在上面的目录下建一个package的那个目录,然后再放在他的下面,肯定正确。我试过的。
我在用4.0.1修改server.xml把路径修改到你的目录也可以不改
为了方便
在你的目录下建web-inf/classes和web-inf/lib两个目录
classes下放你的.class文件
lib下放.jar文件
最近很少来了
哪位对多数据库支持有兴趣可以一起来研究研究