我是jdk1.6+Tomcat 6.0+mysql+mysql5.0
当然相应的文件也已经拷到了相应的目录下了
path路径已设置
classpath=.;D:\Program Files\Java\jdk1.6.0\lib\tools.jar;D:\Program Files\Java\jdk1.6.0\lib\dt.jar;D:\Program Files\Tomcat 6.0\lib\servlet-api.jar;D:\Program Files\Java\jdk1.6.0\lib\mysql-connector-java-5.0.4-bin-g.jar;D:\Program Files\Java\jdk1.6.0\mysqlforjdbc\mysql-connector-java-5.0.4-bin.jar;D:\Program Files\Java\jdk1.6.0\lib\servlet.jar
为什么会出现
org.apache.jasper.JasperException: An exception occurred processing JSP page /index.jsp at line 9
6: request.setCharacterEncoding("gb2312");
7: String sql;
8: sql = "select * from textq";
9: jdbc db = new jdbc();
10: ResultSet rs = db.executeQuery(sql);
11: while (rs.next()){
12: out.print(rs.getString("names"));
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:555)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:414)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
javax.servlet.ServletException: java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:855)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:784)
org.apache.jsp.index_jsp._jspService(index_jsp.java:74)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.NoClassDefFoundError: org/aspectj/lang/Signature
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:169)
org.zl.jdbc.jdbc.<init>(jdbc.java:16)
org.apache.jsp.index_jsp._jspService(index_jsp.java:63)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:390)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
[此贴子已经被作者于2006-12-25 14:02:34编辑过]