%@ page contentType= "text/html; charset=gb2312 "%>
<%@ page import= "java.sql.* "%>
<html>
<BODY>
<%
Class.forName( "org.gjt.mm.mysql.Driver ").newInstance();
String url= "jdbc:mysql://localhost/zqswork?user=root&password=root&useUnicaode=true&characterEncoding=8859-1 ";
Connection conn=DriverManager.getConnection(url);
Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE);
String sql= "selcet*form zqsworktable ";
ResultSet rs=stmt.executeQuery(sql);
while(rs.next()){
%> 第1个字段 <%=rs.getString(1)%>
第2个字段 <%=rs.getString(2)%>
第3个字段 <%=rs.getString(3)%>
<%}%>
<%out.println( "成功拉! ");%>
<%
rs.close();
stmt.close();
conn.close();
%>
</BODY>
</html>
错误如下:
HTTP Status 500 -
--------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: org/aspectj/lang/Signature
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.MyJsp_jsp._jspService(MyJsp_jsp.java:88)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)