注册页面register.jsp,点注册后,出现500错误。注册的信息没录入数据库。我用的是SQLSERVER数据库。An error occurred at line: 15 in the jsp file: /saveregister.jsp
Duplicate local variable password
12: %>
13: <%
14: String username = request.getParameter("username");
15: String password = request.getParameter("password");
16: String sex = request.getParameter("sex");
17: String age = request.getParameter("age");
18: String year = request.getParameter("year");
An error occurred at line: 25 in the jsp file: /saveregister.jsp
sql cannot be resolved
22: String email = request.getParameter("email");
23: String msg = null;
24: username = convert(username);
25: sql = "select * from student where username='" + username + "'";
26: rs = stm.executeQuery(sql); //查询数据库
27: if (!rs.next()) {//如果不存在
28: sex = convert(sex);
An error occurred at line: 26 in the jsp file: /saveregister.jsp
rs cannot be resolved
23: String msg = null;
24: username = convert(username);
25: sql = "select * from student where username='" + username + "'";
26: rs = stm.executeQuery(sql); //查询数据库
27: if (!rs.next()) {//如果不存在
28: sex = convert(sex);
29: age = convert(age);
An error occurred at line: 26 in the jsp file: /saveregister.jsp
stm cannot be resolved
23: String msg = null;
24: username = convert(username);
25: sql = "select * from student where username='" + username + "'";
26: rs = stm.executeQuery(sql); //查询数据库
27: if (!rs.next()) {//如果不存在
28: sex = convert(sex);
29: age = convert(age);
An error occurred at line: 26 in the jsp file: /saveregister.jsp
sql cannot be resolved
23: String msg = null;
24: username = convert(username);
25: sql = "select * from student where username='" + username + "'";
26: rs = stm.executeQuery(sql); //查询数据库
27: if (!rs.next()) {//如果不存在
28: sex = convert(sex);
29: age = convert(age);
Duplicate local variable password
12: %>
13: <%
14: String username = request.getParameter("username");
15: String password = request.getParameter("password");
16: String sex = request.getParameter("sex");
17: String age = request.getParameter("age");
18: String year = request.getParameter("year");
An error occurred at line: 25 in the jsp file: /saveregister.jsp
sql cannot be resolved
22: String email = request.getParameter("email");
23: String msg = null;
24: username = convert(username);
25: sql = "select * from student where username='" + username + "'";
26: rs = stm.executeQuery(sql); //查询数据库
27: if (!rs.next()) {//如果不存在
28: sex = convert(sex);
An error occurred at line: 26 in the jsp file: /saveregister.jsp
rs cannot be resolved
23: String msg = null;
24: username = convert(username);
25: sql = "select * from student where username='" + username + "'";
26: rs = stm.executeQuery(sql); //查询数据库
27: if (!rs.next()) {//如果不存在
28: sex = convert(sex);
29: age = convert(age);
An error occurred at line: 26 in the jsp file: /saveregister.jsp
stm cannot be resolved
23: String msg = null;
24: username = convert(username);
25: sql = "select * from student where username='" + username + "'";
26: rs = stm.executeQuery(sql); //查询数据库
27: if (!rs.next()) {//如果不存在
28: sex = convert(sex);
29: age = convert(age);
An error occurred at line: 26 in the jsp file: /saveregister.jsp
sql cannot be resolved
23: String msg = null;
24: username = convert(username);
25: sql = "select * from student where username='" + username + "'";
26: rs = stm.executeQuery(sql); //查询数据库
27: if (!rs.next()) {//如果不存在
28: sex = convert(sex);
29: age = convert(age);
解决方案 »
- 新手求问在服务器配置jsp网站
- 错误:java.lang.NullPointerException,求指教!
- 向大神求助 kindEditor4.1与struts2项目的整合 上传图片和视频
- jsp中<a href="NoteServlet?status=selectall">链接的问题
- javamail问题
- 与数据库的网络中断了一下,hibernate的连接就关闭了,如何解决
- {求助}请问JAVA板块中怎么实现servlet程序,怎么输出中文啊?最好用什么软件编辑软件?
- jsp传递参数乱码问题??急急
- 深入探讨分页问题
- 那位大哥大姐有jdbc for dbase的驱动程序,请发邮件或下载地址给我,急!
- SSH整合以后启动TOMCAT报错,大家帮我看看吧。
- 关于struts2 附件表单Linux平台下取不到值得问题
sql没有声明---》String sql;其他变量类似
25:Stringsql = "select * from student where username='" + username + "'";
26: ResultSet rs = stmt.executeQuery(sql); //查询数据库晕死