Topic: 这个出错信息是什么意思? |
Print this page |
1.这个出错信息是什么意思? | Copy to clipboard |
Posted by: linkeca Posted on: 2005-10-27 12:51 我的代码如下:<%@ page session="true" %> <%@ page import="java.sql.* " %> <jsp:useBean id="pool" scope="session" class="text.check"/> <html> <head> <title>Book store</title> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head> <body bgcolor="#F4F5FF"> <font face="Times New Roman,Time" size="+3"> 网上书店 </font> <hr><p> <center> <% String name=request.getParameter("name"); String pwd=request.getParameter("password"); String sql="select *from customer_info where Name='"+name+"' and Passwd='"+pwd+"'"; pool.getUserId(name); pool.getSQL(sql); rs1=pool.buildlink(); if(rs1.next()){ String customerid=temp.toString(); session.putValue("loginSign","OK"); session.putValue("cID",customerid); response.sendRedirect("list.jsp"); } else { rs1.close(); session.putValue("login_message","用户名或密码错误"); %> <jsp:forward page="register.jsp"/> <% } } //catch(Exception e) { //e.getMessage(); } %> </center> </body> </html> 出错信息: org.apache.jasper.JasperException: Unable to compile class for JSP Generated servlet error: D:\Tomcat\work\Catalina\localhost\myweb\org\apache\jsp\shop\login_jsp.java:31: 'try' without 'catch' or 'finally' try { ^ Generated servlet error: D:\Tomcat\work\Catalina\localhost\myweb\org\apache\jsp\shop\login_jsp.java:102: illegal start of type } catch (Throwable t) { ^ Generated servlet error: D:\Tomcat\work\Catalina\localhost\myweb\org\apache\jsp\shop\login_jsp.java:112: <identifier> expected } ^ Generated servlet error: D:\Tomcat\work\Catalina\localhost\myweb\org\apache\jsp\shop\login_jsp.java:113: 'class' or 'interface' expected } ^ Generated servlet error: D:\Tomcat\work\Catalina\localhost\myweb\org\apache\jsp\shop\login_jsp.java:114: 'class' or 'interface' expected ^ 5 errors org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84) org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:332) org.apache.jasper.compiler.Compiler.generateClass(Compiler.java:412) org.apache.jasper.compiler.Compiler.compile(Compiler.java:472) org.apache.jasper.compiler.Compiler.compile(Compiler.java:451) org.apache.jasper.compiler.Compiler.compile(Compiler.java:439) org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:511) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:295) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) |
2.Re:这个出错信息是什么意思? [Re: linkeca] | Copy to clipboard |
Posted by: YuLimin Posted on: 2005-10-28 08:56 login_jsp.java:31: 'try' without 'catch' or 'finally' 打开D:\Tomcat\work\Catalina\localhost\myweb\org\apache\jsp\shop\login_jsp.java:31 看看,然后对应到login.jsp去查查 你的try catch不对应 |
Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1 客服电话 18559299278 客服信箱 714923@qq.com 客服QQ 714923 |