?? categoryquery.jsp
字號(hào):
<%@ page language="java" import="java.util.*" contentType="text/html; charset=utf-8"
pageEncoding="UTF-8"%>
<%@ page import="com.cric.onlineshopclothes.dao.ProductDAO" %>
<%@ page import="com.cric.onlineshopclothes.javabean.Category" %>
<%@ page import="java.util.List" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
ProductDAO dao=new ProductDAO();
List list=(List)request.getAttribute("list");
if(list==null){
list=dao.getCategoryByUsername("");
}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP 'index.jsp' starting page</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<body>
<form name="form1" method="post" action="CategoryServlet">
<table width="512" border="0" cellspacing="0" cellpadding="0" height="263">
<tr>
<td width="512" bgcolor="#00FF00"><div align="center"><strong>商品類(lèi)別查詢(xún)</strong></div></td>
</tr>
<tr>
<td>類(lèi)別名稱(chēng):<input name="categoryname" type="text" size="30">
<input type="submit" name="Submit" value="查詢(xún)">
</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td><table width="99%" border="0" cellspacing="0" cellpadding="0" id="border">
<tr>
<td height="39" width="101" ><div align="center">編號(hào)</div></td>
<td width="101"><div align="center">類(lèi)別名</div></td>
<td width="101"><div align="center">狀態(tài)</div></td>
<td width="101"><div align="center">更新時(shí)間</div></td>
<td width="105" ><div align="center">操作 </div></td>
</tr>
<% for(int i=0;i<list.size();i++){
Category category=(Category)list.get(i);
%>
<tr>
<td><%=category.getCategoryId() %></td>
<td><%=category.getCategoryName() %></td>
<td><%=category.getCategoryState()%></td>
<td><%=category.getUpdateTime() %></td>
<td><div align="center"><a href="updateCategory.jsp">修改</a> </div></td>
</tr>
<%} %>
</table></td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
</form>
</body>
</html>
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -