jsp连接数据库 总是报错!求大神! 5
org.apache.jasper.JasperException:UnabletocompileclassforJSP:Anerroroccurredatline:31...
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 31 in the jsp file: /dbaccess.jsp
String literal is not properly closed by a double-quote
28:
29: stmt = con.createStatement();
30:
31: stmt.executeUpdate("insert into BOOKS (ID,NAME,TITLE,PRICE)
32: values('999','TOM','Tomcat Bible',44.5)");
33:
34: rs = stmt.executeQuery("select ID,TITLE,PRICE form BOOKS");
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:443)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723) 展开
An error occurred at line: 31 in the jsp file: /dbaccess.jsp
String literal is not properly closed by a double-quote
28:
29: stmt = con.createStatement();
30:
31: stmt.executeUpdate("insert into BOOKS (ID,NAME,TITLE,PRICE)
32: values('999','TOM','Tomcat Bible',44.5)");
33:
34: rs = stmt.executeQuery("select ID,TITLE,PRICE form BOOKS");
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:443)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:334)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:321)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:592)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:723) 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询