您现在的位置是:网站首页> 编程资料编程资料
jsp分页显示完整实例_JSP编程_
2023-05-25
143人已围观
简介 jsp分页显示完整实例_JSP编程_
本文实例讲述了jsp分页显示的实现方法。分享给大家供大家参考。
具体实现方法如下:
复制代码 代码如下:
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<%@include file ="../inc/ChkPwd.jsp"%>
<%@include file="../DB.jsp"%>
文章管理
<%@include file ="../inc/ChkPwd.jsp"%>
<%@include file="../DB.jsp"%>
| --内容管理 | |||||||||
| | <% String op; String ID = request.getParameter("id"); op = request.getParameter("op"); if(op==null){ op = "my"; } if (op.equals("del") && ID!=null){ String bbb = new String(request.getParameter("BigClassName").getBytes("iso8859_1")); Statement stmt_ChannelDEL=conn.createStatement(); String Sqldel="delete from hl_news where id=" + ID; int shan=stmt_ChannelDEL.executeUpdate(Sqldel); if (shan>0) { out.print(""); } stmt_ChannelDEL.close(); return ; } Statement stmtA=conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY); String SqlA="Select * from hl_smallclass WHERE bigname='行业新闻' order by id asc"; ResultSet RsA=stmtA.executeQuery(SqlA); while (RsA.next()) { %> <%=RsA.getString("smallname")%> | <% } RsA.close(); //关闭记录集对象 stmtA.close(); //关闭语句对象 %> | |||||||||
<%
RsArticle.close();
stmt_Article.close();
conn.close();
%>
希望本文所述对大家的jsp程序设计有所帮助。
您可能感兴趣的文章:
