jsp页面一直报错500
<%StringID=request.getParameter("ID");Stringurl="jdbc:mysql://localhost/myssh";String...
<%String ID=request.getParameter("ID"); String url = "jdbc:mysql://localhost/myssh"; String userName = "root"; String password = "123"; String sql = null; Connection conn = null; Statement stmt = null; try { Class.forName("com.mysql.jdbc.Driver"); } catch(ClassNotFoundException e) { System.out.println("加载驱动器类时出现异常"); } conn = DriverManager.getConnection(url, userName, password); //创建Statement语句 stmt = conn.createStatement(); url="select * from xinxi where ID="+ID; ResultSet rs=stmt.executeQuery(url); rs.next(); %><form name="xinxi_form" method="post" action="xg.jsp?ID=<%=rs.getString(1)%>"><table width="300" border="1" align="center"> <%-- <tr><td align=center width="80">ID:</td><td><input type="text" name="ID" id="ID" value= "<%=rs.getString(2)%> "></td></tr> --%><tr><td align=center width="80">姓名:</td><td><input type="text" name="xingming" id="xingming" value= "<%=rs.getString(2)%> " ></td></tr><tr><td align=center width="80">性别:</td><td><input type="text" name="xingbie" id="xingbie" value= "<%=rs.getString(3)%> " ></td></tr><tr><td align=center width="80">年龄:</td><td><input type="number" name="age" id="num" value= "<%=rs.getString(4)%> " max="100" min="1" step="1" ></td></tr><tr><td align=center width="80">手机号:</td><td><input type="tel" name="tel" id="tel1" value= "<%=rs.getString(5)%> " ></td></tr><tr><td align=center width="80">邮箱:</td><td><input type="email" name="email" id="email" value= "<%=rs.getString(6)%> " ></td></tr><tr><td align=center width="80">入卡时间:</td><td><input type=date name="date" id="day1" value= "<%=rs.getString(7)%> " ></td></tr> <tr><td> </td><td><input type="submit" name="xiugaiH" id="xiugaiH" value="修改"> <input type="reset" name="res" value="重置"></td>
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询