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

📄 a_index.jsp

📁 hibernate做的一个网上商店系统
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK" import="java.util.List,mrgf.hibernate.*,mrgf.other.*" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/struts-tiles.tld" prefix="tiles" %>
<html>
<link rel="stylesheet" href="css/style.css">
<head>
<title>
index
</title>
</head>
<body bgcolor="#ffffff" topmargin="0">
<table width="100%" height="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="126" background="image/other/hortation.jpg">&nbsp;</td>
  </tr>
  <tr align="right">
    <td height="22" background="image/other/new_merchandise.jpg"><a href="all_new_merchandise.do">More>></a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
  </tr>
  <tr>
    <td height="493" background="image/other/background_index.jpg" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td colspan="2" height="10"></td>
      </tr>
      <%
      String hql = "from MerchandiseInfo where head='y'";
      List merchandises = new Hibernate().query(hql);
      int l=0;
      for(int i=0;i<3;i++){
      %>
      <tr>
        <td colspan="2" height="5"></td>
      </tr>
      <tr height="154" align="center">


      <%
      if(l<merchandises.size()){
        MerchandiseInfo info=(MerchandiseInfo)merchandises.get(l);
      %>
        <td width="50%"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr height="23">
            <td width="50%" align="center">
              <table width="100%"  border="0" cellspacing="0" cellpadding="4">
                <tr align="center">
                  <td><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>" class="style2"><img src="image/MerchandisePhoto/<%=info.getPhoto() %>" width="112" height="102"></a></td>
                </tr>
              </table>
            </td>
            <td width="50%" align="center">
              <table width="100%"  border="0" cellspacing="0" cellpadding="4">
                <tr>
                  <td>价格:<%=info.getPrice() %></td>
                </tr>
                <tr>
                  <td>简介:<%=info.getIntroduce() %></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr height="23">
            <td align="center"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>" class="style2"><%=info.getName() %></a></td>
            <td align="right"><a href="sonSort.do?fatherId=<%=info.getSortId() %>&requestPage=/index.jsp" class="style2">More>></a>&nbsp;&nbsp;</td>
          </tr>
        </table></td>
      <%
      }
      l=l+1;
      %>


      <%
      if(l<merchandises.size()){
        MerchandiseInfo info=(MerchandiseInfo)merchandises.get(l);
      %>
        <td width="50%"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr height="23">
            <td width="50%" align="center">
              <table width="100%"  border="0" cellspacing="0" cellpadding="4">
                <tr align="center">
                  <td><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>" class="style2"><img src="image/MerchandisePhoto/<%=info.getPhoto() %>" width="112" height="102"></a></td>
                </tr>
              </table>
            </td>
            <td width="50%" align="center">
              <table width="100%"  border="0" cellspacing="0" cellpadding="4">
                <tr>
                  <td>价格:<%=info.getPrice() %></td>
                </tr>
                <tr>
                  <td>简介:<%=info.getIntroduce() %></td>
                </tr>
              </table>
            </td>
          </tr>
          <tr height="23">
            <td align="center"><a href="merchandise_info.do?merchandiseId=<%=info.getId() %>" class="style2"><%=info.getName() %></a></td>
            <td align="right"><a href="sonSort.do?fatherId=<%=info.getSortId() %>&requestPage=/index.jsp" class="style2">More>></a>&nbsp;&nbsp;</td>
          </tr>
        </table></td>
      <%
      }
      l=l+1;
      %>


      </tr>
      <%
      }
      %>
    </table></td>
  </tr>
</table>
</body>
</html>

⌨️ 快捷键说明

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