viewcategory.jsp
来自「基于WEB的商品管理系统」· JSP 代码 · 共 45 行
JSP
45 行
<%@ page contentType="text/html; charset=gb2312" language="java" import="org.me.product.*,java.util.*,java.io.*" errorPage="error.jsp" %><%@ include file="trans.jsp"%><%--The taglib directive below imports the JSTL library. If you uncomment it,you must also add the JSTL library to the project. The Add Library... actionon Libraries node in Projects view can be used to add the JSTL 1.1 library.--%><%--<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> --%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Untitled Document</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head><jsp:useBean id="category" class="org.me.product.ViewCategory" scope="page"/><body><center><h1>查看所有的商品类别</h1><table width=80% border="1" bgcolor="#0099CC"><tr bgcolor="#009966" bordercolor="#990066"><td>id</td><td>类别名</td><td>描述</td></tr><%Collection categorys=category.getAllCategory();Iterator it=categorys.iterator();while(it.hasNext()){ Category temp=(Category)it.next(); out.println("<tr bordercolor=#990066>"); out.println("<td><a href='searchProductByCategory.jsp?category="+temp.getCategoryId()+"'>"+temp.getCategoryId()+"</a></td>"); out.println("<td>"+trans(temp.getName())+"</td>"); out.println("<td>"+trans(temp.getDescription())+"</td>"); out.println("</tr>");}%></table><a href="index.jsp">返回</a></center></body></html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?