⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sortresult.jsp

📁 struts1 hibernate3 电子购物商城源码 加上了ANT编译.
💻 JSP
字号:
<%@ page language="java" import="java.util.List" contentType="text/html; charset=utf-8"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html>
<style type="text/css">
<!--
.STYLE4 {font-size: 14px; color: #999900; }
.STYLE5 {
	font-size: 16px;
	font-weight: bold;
	color: #666600;
}
.STYLE6 {
	font-size: 16px;
	color: #CC3366;
}
.STYLE8 {font-size: 16px; color: #CC3300; }
.STYLE9 {
	font-size: 12px;
	color: #FF9900;
}
.STYLE10 {color: #FF0000}
.STYLE11 {
	font-size: 12px;
	color: #996600;
}
-->
</style>
<body>
该类产品有:

		<%
			int totalcount1 = ((Integer) request.getAttribute("totalcount1")).intValue();//得到总的记录数
			int sortpage1 = ((Integer) request.getAttribute("sortpage1")).intValue();//得到当前页数
			int sortpagesize1 = ((Integer) request.getAttribute("sortpagesize1")).intValue();//得到当前页数的记录数
			String commodityid = (String) request.getAttribute("commodityid");
			List list = (List)request.getAttribute("productlist");
			int totalpage; //定义总共的页数
			if (totalcount1 % sortpagesize1 == 0) {
				totalpage = totalcount1 / sortpagesize1;
			} else {
				totalpage = totalcount1 / sortpagesize1 + 1;
			}
		%>
		   <%
		   if(list.size()==0)
		   { 
		   %>
		   <span class="STYLE10">对不起,找不到产品</span>
<%
		   }
		   else
           {
           
           %>	
		<table border="0">

		<logic:iterate id="dd" name="productlist"
			type="dream.ourshopping.domain.Product" scope="request">
			<tr>
				<td colspan="2">
					<span class="STYLE4">名称: </span><span class="STYLE5"><bean:write
							name="dd" property="name" /> </span>
				</td>
			</tr>

			<tr>
				<td width="210">
					<IMG width="130" height="80" src="<bean:write name="dd" property="image" />" />
				</td>
				<td width="408">
					<table border="0">

						<tr>
							<td width="180">
								<span class="STYLE4">市场价格:</span><span class="STYLE6">
								<bean:write
										name="dd" property="price" /> </span>
						  </td>
							<td width="180" >
							<a href="jump.do?action=detail&num=<%=dd.getId() %>">	<div class="STYLE4">
									详情
								</div></a>
						  </td>

						</tr>
						<tr>
							
							<td>
								<span class="STYLE4">会员价:</span><span class="STYLE8"><bean:write
										name="dd" property="saleprice" /> </span>
							</td>
							<td >
								<a href="payon.do?num=<%=dd.getId() %>"><span class="STYLE4">定购</span> </a>
							</td>
						</tr>
					</table>
				</td>
			</tr>
			<tr><td colspan="2"></td></tr>
			<tr><td colspan="2"></td></tr>
		</logic:iterate>
	</table>
		<span class="STYLE9">第<%=sortpage1 %>页/总共<%=totalpage %>页</span>
		<p align="center"><span class="STYLE11">
	    <%if(sortpage1!= 1) {%>
	    <a href="searchBySortId.do?id=<%=commodityid%>&sortpage=<%=sortpage1-1%>&sortpagesize=2">上一页</a>
	    <%}
        else
        {
        %>
	    上一页
	    <%
        }
        %>
	    |
	    <%if (totalpage > sortpage1) {%>
	    <a href="searchBySortId.do?id=<%=commodityid%>&sortpage=<%=sortpage1+1%>&sortpagesize=2">下一页</a>
	    <%}
		else
		{
		%>
	    下一页
	    <% 
		}}%>
		  
		  
	
	      </span>                </p>
</body>
</html:html>

⌨️ 快捷键说明

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