public.jsp

来自「此小软件实现了小型超市的进销存系统,它展示了小型超市的进货和销售,还有库存的各种」· JSP 代码 · 共 50 行

JSP
50
字号
<%@ page contentType="text/html; charset=GB2312" %>
<%@ page import="java.sql.*"%>
<jsp:useBean id="DBConn" class="jspeshop.DBConn" scope="page"/>
<%
if(session.getAttribute("name")==null){
 
response.sendRedirect("index.jsp");
}else{
Connection con =DBConn.GetConn();
  Statement st = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_READ_ONLY);

String sql="select * from Publics ";
ResultSet rs=st.executeQuery(sql);
String publics="";
if (rs.next())
{
publics=rs.getString ("PUBLIC");

}
%><head>
<html>

<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>公告设置</title>
<link href="../style.css" rel="stylesheet" type="text/css">
</head>

<body>

<p align="center"> </p>
<p align="center"> </p>
<p align="center">公告设置</p>
<form method="POST" action="public2.jsp">

	<p align="center"><textarea name="publics" cols="49" rows="17" id="publics"><%=publics%></textarea>
	</p>
	<p align="center"><input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></p>
</form>
<p align="center"> </p>
<p align="center"> </p>

</body>

</html>
<%
}
%>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?