JAVA和SQl

stmt.close();conn.close();response.sendRedirect(response.encodeURL("ROOT/login.jsp"))... stmt.close();
conn.close();
response.sendRedirect(response.encodeURL("ROOT/login.jsp"));
}

}

}catch(SQLException ex){
out.println(ex.getMessage());
out.println(ex.getSQLState());
out.println(ex.getErrorCode());
ex=ex.getNextException();

}

out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\t</body>\r\n");
out.write("</html>");
} catch (Throwable t) {
if (!(t instanceof SkipPageException)){
out = _jspx_out;
if (out != null && out.getBufferSize() != 0)
out.clearBuffer();
if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
}
} finally {
if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
}
}
}
//有错误信息:
jjj.java:78: ')' expected
stmt.executeUpdate(INSERT INTO TABLE2 VALUES('_u
sername','_password';));
^
jjj.java:78: unclosed character literal
stmt.executeUpdate(INSERT INTO TABLE2 VALUES('_u
sername','_password';));
^
jjj.java:78: unclosed character literal
stmt.executeUpdate(INSERT INTO TABLE2 VALUES('_u
sername','_password';));

^
jjj.java:8: class login_jsp is public, should be declared in a file named login_
jsp.java
public final class login_jsp extends org.apache.jasper.runtime.HttpJspBase
^
jjj.java:8: package org.apache.jasper.runtime does not exist
public final class login_jsp extends org.apache.jasper.runtime.HttpJspBase
^
jjj.java:9: package org.apache.jasper.runtime does not exist
implements org.apache.jasper.runtime.JspSourceDependent {
^
jjj.java:56: cannot resolve symbol
symbol : variable _e_mail
location: class org.apache.jsp.login_jsp
if(_e_mail.equals("")){
^
jjj.java:57: cannot resolve symbol
symbol : variable _e_mail
location: class org.apache.jsp.login_jsp
_e_mail="no email address";

^
jjj.java:78: cannot resolve symbol
symbol : variable INSERT
location: class org.apache.jsp.login_jsp
stmt.executeUpdate(INSERT INTO TABLE2 VALUES('_u
sername','_password';));
^
Note: jjj.java uses or overrides a deprecated API.
Note: Recompile with -deprecation for details.
9 errors
展开
 我来答
真的懒的说
2006-01-24 · TA获得超过134个赞
知道答主
回答量:299
采纳率:0%
帮助的人:0
展开全部
描述的不清楚

stmt.executeUpdate(INSERT INTO TABLE2 VALUES('_u
sername','_password';));
改为
stmt.executeUpdate("INSERT INTO TABLE2 VALUES('_u
sername','_password')");

如果_username和_password是变量就还要改一下
stmt.executeUpdate("INSERT INTO TABLE2 VALUES('"+_u
sername+"','"+_password+"')");
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式