![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
jsp查询数据库表格数据
程序猿子龙
我爱代码
展开
-
jsp重定向与转发的理解和区别
jsp重定向与转发的理解和区别。 最近学了jsp:java server page , java服务器页面技术. 在服务器运行jsp,把html返回给浏览器页面,优势jsp可以写java代码。 重定向: response.sendRedirect(“地址”); a. 页面地址显示最终页面 b. 不可向后传递参数 c. 跳到外部站点 服务器转发: request.getRequestDispatcher(“地址”).forward(request, response); a. 页面地址显示请求页面 b.原创 2020-09-29 19:40:03 · 719 阅读 · 0 评论 -
JSP查询数据库
JSP查询数据库 MyJsp <% Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; String sql = "slecte * from users"; 编号姓名年龄用户名密码conn= DBUtil.getConn(); try { ps = conn.prepareStatement(sql); rs = ps.executeQuery()原创 2020-09-26 17:27:31 · 652 阅读 · 0 评论