【j2ee spring】32、巴巴运动网的产品类别页面

巴巴运动网的产品类别页面

1、项目图解

这里面好多页面都是错的,只是个模板,暂时用不上,需要的代码我会全部贴出来,最后做完的时候我会把项目发上来

2、首先我们引入相应的jar包

3、首先我们组装整个页面的整体格局

页面的素材我会上传的,链接是:http://download.csdn.net/detail/cutter_point/8803985

top.jsp

<%@ page contentType="text/html;charset=UTF-8"%>

<%@ page import="java.util.Date"%>

<%@ page import="java.text.SimpleDateFormat"%>

<%

Date dNow = new Date();

SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd日");

%>

<HTML><HEAD><TITLE>Untitled Document</TITLE>

<META http-equiv=Content-Typecontent="text/html; charset=UTF-8">

<STYLE type=text/css>.top {

    FONT-SIZE: 9pt; VERTICAL-ALIGN: bottom; PADDING-TOP: 0px; FONT-FAMILY: "宋体"; 006600:

}

BODY {

    MARGIN-TOP: 0px; FONT-SIZE: 9pt; MARGIN-LEFT: 0px; COLOR: #ffffff; LINE-HEIGHT: 150%; MARGIN-RIGHT: 0px; FONT-FAMILY: "宋体"; BACKGROUND-COLOR: #ffffff ;

Crollbar-Face-color:#FFCC00;

Scrollbar-Highlight-Color:#FF0000;

Scrollbar-Shadow-Color:#FFFFFF;

Scrollbar-3Dlight-Color:#000000;

Scrollbar-Arrow-Color:#000000;

Scrollbar-Track-Color:#FDEAC4;

Scrollbar-Darkshadow-Color:#FFFF00;

}

TD {

    FONT-SIZE: 9pt; COLOR: #ffffff; LINE-HEIGHT: 150%; FONT-FAMILY: 宋体

}

.My {  font-size: 25px; color:#FFFFFF;font-weight::bold}

TD.top {

    PADDING-RIGHT: 4px; PADDING-LEFT: 4px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px

}

A:link {

    COLOR: #ffffff; TEXT-DECORATION: none

}

A:visited {

    COLOR: #ffffff; TEXT-DECORATION: none

}

A:hover {

    COLOR: #cebef7; TEXT-DECORATION: none

}

</STYLE>

<SCRIPT language=JavaScript>

<!--

function MM_findObj(n, d) { //v3.0

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length){

   d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all)x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++)x=MM_findObj(n,d.layers[i].document); return x;

}

function MM_nbGroup(event, grpName) { //v3.0

  var i,img,nbArr,args=MM_nbGroup.arguments;

  if (event == "init" && args.length > 2){

    if ((img = MM_findObj(args[2])) != null && !img.MM_init) {

      img.MM_init = true; img.MM_up = args[3]; img.MM_dn= img.src;

      if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();

      nbArr[nbArr.length] = img;

      for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) !=null) {

        if (!img.MM_up) img.MM_up = img.src;

        img.src = img.MM_dn =args[i+1];

        nbArr[nbArr.length] = img;

    } }

  } else if (event == "over") {

    document.MM_nbOver = nbArr = new Array();

    for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) !=null) {

      if (!img.MM_up) img.MM_up = img.src;

      img.src = (img.MM_dn&& args[i+2]) ? args[i+2] : args[i+1];

      nbArr[nbArr.length] = img;

    }

  } else if (event == "out" ) {

    for (i=0; i <document.MM_nbOver.length; i++) {

      img = document.MM_nbOver[i];img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }

  } else if (event == "down") {

    if ((nbArr = document[grpName]) != null)

      for (i=0; i < nbArr.length; i++) {img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }

    document[grpName] = nbArr = new Array();

    for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) !=null) {

      if (!img.MM_up) img.MM_up = img.src;

      img.src = img.MM_dn =args[i+1];

      nbArr[nbArr.length] = img;

  } }

}

function MM_preloadImages() { //v3.0

 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

   var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0; i<a.length; i++)

   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}

function exitsystem(){

    if (confirm('您确定要退出系统吗?'))

     window.parent.location="<html:rewriteaction='/Administrator/Logout'/>";

}

//-->

</SCRIPT>

<META content="MSHTML6.00.2600.0" name=GENERATOR></HEAD>

<BODY bgColor=#ffffff

onload="javascript:MM_preloadImages('images/OAHeader_r1_c3_f2.gif','images/OAHeader_r1_c3_f3.gif','images/OAHeader_r1_c5_f2.gif','images/OAHeader_r1_c5_f3.gif','images/OAHeader_r1_c7_f2.gif','images/OAHeader_r1_c7_f3.gif','images/OAHeader_r1_c9_f2.gif','images/OAHeader_r1_c9_f3.gif','images/OAHeader_r1_c11_f2.gif','images/OAHeader_r1_c11_f3.gif');">

<TABLE style="MARGIN: 0px" cellSpacing=0 cellPadding=0 width="100%"

bgColor=#6386de border=0 valign="top">

 <TBODY>

 <TR vAlign=top>

     <TD vAlign=top width="450"class="My" Align=left><img src="../images/global/managelogo.gif" border=0 /></TD>

   <TD width="124">

     <TABLE style="MARGIN: 0px" height="100%" cellSpacing=0 cellPadding=0

      bgColor=#6386de border=0>

        <TBODY></TBODY></TABLE></TD>

   <TD align=right width=611>

     <TABLE style="MARGIN: 0px" height="100%" cellSpacing=0 cellPadding=0

      bgColor=#6386de border=0>

        <TBODY>

        <TR vAlign=bottom height=20>

          <TD width=18><IMG src="../images/top_toolbar.gif" border=0></TD>

            <TD class=top bgColor=#000000><NOBR>登录者:${employee.realname }| 当前日期-<%=formatter.format(dNow)%></NOBR></TD>

            </TR>

        <TR height=38>

          <TD></TD>

          <TD vAlign=center align=right><A

           onmouseover="MM_nbGroup('over','OAHeader_r1_c0','../images/OAHeader_r1_c0_f2.gif','../image/OAHeader_r1_c0_f3.gif',1);"

           title="我的日历" onmouseout="MM_nbGroup('out');"

           href="<html:rewrite action='/ControlCenter/MainUI/Center'/>"  target="mainframe">

            <IMG src="../images/OAHeader_r1_c0.gif" border=0  name=OAHeader_r1_c0></A> <SPAN id=msg name="msg">

            <A  onmouseover="MM_nbGroup('over','OAHeader_r1_c3','../images/OAHeader_r1_c3_f2.gif','../images/OAHeader_r1_c3_f3.gif',1);"

           title="帮助文档" style="CURSOR: hand"

            onmouseout="MM_nbGroup('out');" href="<html:rewrite action='/ControlCenter/MainUI/Doc'/>"  target="mainframe"><IMG id=OAHeader_r1_c3

           src="../images/OAHeader_r1_c3.gif" border=0  name=OAHeader_r1_c3></A></SPAN> <A

           onmouseover="MM_nbGroup('over','OAHeader_r1_c5','../images/OAHeader_r1_c5_f2.gif','../image/OAHeader_r1_c5_f3.gif',1);"

           title=刷新页面 onmouseout="MM_nbGroup('out');"

           href="javascript:parent.mainframe.location.reload()"><IMG

           src="../images/OAHeader_r1_c5.gif" border=0

           name=OAHeader_r1_c5></A> <A

           onmouseover="MM_nbGroup('over','OAHeader_r1_c7','../images/OAHeader_r1_c7_f2.gif','../image/OAHeader_r1_c7_f3.gif',1);"

           title=后退 onmouseout="MM_nbGroup('out');"

           href="javascript:history.back()"><IMG src="../images/OAHeader_r1_c7.gif" border=0

           name=OAHeader_r1_c7></A> <A

           onmouseover="MM_nbGroup('over','OAHeader_r1_c9','/images/OAHeader_r1_c9_f2.gif','/image/OAHeader_r1_c9_f3.gif',1);"

           title=前进 onmouseout="MM_nbGroup('out');" href="javascript:history.forward()"><IMG

           src="../images/OAHeader_r1_c9.gif" border=0  name=OAHeader_r1_c9></A> <A

           onmouseover="MM_nbGroup('over','OAHeader_r1_c11','/images/OAHeader_r1_c11_f2.gif','/image/OAHeader_r1_c11_f3.gif',1);"

           title=退出系统 onmouseout="MM_nbGroup('out');"

           href="javascript:exitsystem()"><IMG

           src="../images/OAHeader_r1_c11.gif" border=0

           name=OAHeader_r1_c11></A> 

</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></BODY></HTML>

End.jsp

<%@ page contentType="text/html;charset=UTF-8"%>

<HTML><HEAD><TITLE>Untitled Document</TITLE>

<META http-equiv=Content-Typecontent="text/html; charset=UTF-8">

<STYLE type=text/css>

BODY {

    MARGIN-TOP: 0px; FONT-SIZE: 9pt; MARGIN-LEFT: 0px; COLOR: #ffffff; LINE-HEIGHT: 150%; MARGIN-RIGHT: 0px; FONT-FAMILY: "宋体"; BACKGROUND-COLOR: #ffffff

}

</STYLE>

<BODY bgColor=#ffffff >

<TABLEstyle="MARGIN: 0px" cellSpacing=0cellPadding=0width="100%"

bgColor=#6386deborder=0valign="top">

 <TBODY>

 <TR vAlign=top>

     <TD vAlign=center width="450"class="My" Align=center> 

      <BR>

       

      <BR></TD>

   <TD width="124">

</BODY></HTML>

Left.jsp

<%@ page contentType="text/html;charset=UTF-8"%>

<%@taglib uri="/struts-tags"prefix="s" %>

<html>

<head>

<meta http-equiv="Content-Type"content="text/html; charset=UTF-8">

<base target="mainframe">

<Script language="javaScript">

function getTablesByStart(name){

    var inputs =document.getElementsByTagName("table");

    var files = new Array();

    var y = 0;

    for (var i=0; i<inputs.length; i++) {      

     if (inputs[i].id !=null &&inputs[i].id.length>name.length && inputs[i].id.substring(0,name.length)==name){

         files[y] = inputs[i];

         y++;

     }

    }

    return files;

}

function HideAll(){

    var tables = getTablesByStart("menu_");

    for (var i=0; i<tables.length; i++) {

        tables[i].style.display = "none";

        var id = tables[i].id.substring("menu_".length);

        var imgId = document.getElementById("Img"+ id);

        var imgId2 = document.getElementById("Img"+ id + "_0");

        if(imgId) imgId.src="/images/midclosedfolder.gif";

        if(imgId2) imgId2.src="/images/clsfld.gif";

    }

}

function turnit(id) {

    var menu = document.getElementById("menu_"+ id);

    var imgId = document.getElementById("Img"+ id);

    var imgId2 = document.getElementById("Img"+ id + "_0");

    if (menu.style.display=="none"){

        HideAll();

        menu.style.display = "";

        if(imgId) imgId.src="/images/midopenedfolder.gif";

        if(imgId2) imgId2.src="/images/openfld.gif";

    }else{

        menu.style.display = "none";

        if(imgId) imgId.src="/images/midclosedfolder.gif";

        if(imgId2) imgId2.src="/images/clsfld.gif";

    }

}

</Script>

<style type="text/css">

<!--

td {  font-size: 13px; color:#000000;font-weight:none}

a:active {  color:#FF6600;text-decoration:none}

a:hover {  color:#FF6600;text-decoration:none}

a:link {  color: #FF6600;text-decoration:none}

a:visited {  color:#FF6600;text-decoration:none}

-->

</style>

</head>

<body leftmargin="0"topmargin="0" bgcolor="#F1F1F1"><br>

<!-------------------------订单管理START------------------------------->

<table border=0 width="98%" align="center"cellspacing="0" cellpadding="0">

 <tr>

   <td colspan="3" language="JavaScript"onMouseUp="turnit('order')" style="CURSOR: hand">

     <img id="Imgorder" src="/images/midclosedfolder.gif"align="absMiddle" border="0" width="16"><img name="Imgorder_0" src="../images/clsfld.gif" align="absMiddle" border="0">

        <fontface=宋体><b>订单管理</b></font>

   </td>

 </tr>

</table>

<table id="menu_order"border=0 width="98%"align="center" cellspacing="0"cellpadding="0" style="display:none">

 <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/order/query'/>">订单查询</a></td>

 </tr>

 <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/order/list'/>">待审核订单</a></td>

 </tr>

  <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/order/list'/>?state=WAITPAYMENT">等待付款订单</a></td>

 </tr>

  <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/order/list'/>?state=ADMEASUREPRODUCT">正在配货订单</a></td>

 </tr>

  <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/order/list'/>?state=WAITDELIVER">等待发货订单</a></td>

 </tr>

  <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/order/list'/>?state=DELIVERED">已发货订单</a></td>

 </tr>

  <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/order/list'/>?state=RECEIVED">已收货订单</a></td>

 </tr>

 <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/order/list'/>?state=CANCEL">已取消订单</a></td>

 </tr>

 <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/contorl/lockorder/list'/>">已锁定订单</a></td>

 </tr>

</table>

<!-------------------------订单管理END------------------------------->

<!-------------------------产品管理START------------------------------->

<table border=0 width="98%" align="center"cellspacing="0" cellpadding="0">

 <tr>

   <td colspan="3" language="JavaScript"onMouseUp="turnit('Product')" style="CURSOR: hand">

     <img id="ImgProduct" src="../images/midclosedfolder.gif" align="absMiddle" border="0" width="16"><img name="ImgProduct_0" src="../images/clsfld.gif" align="absMiddle" border="0">

        <fontface=宋体><b>产品管理</b></font>

   </td>

 </tr>

</table>

<table id="menu_Product"border=0 width="98%"align="center" cellspacing="0"cellpadding="0" style="display:none">

 <tr>

   <td width="50"><img src="../images/vertline.gif"border=0><img src="../images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="../images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<s:url action='producttype'/>">产品类别管理</a></td>

 </tr>

 <tr>

   <td width="50"><img src="../images/vertline.gif"border=0><img src="../images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="../images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/brand/list'/>">产品品牌管理</a></td>

 </tr>

 <tr>

   <td width="50"><img src="../images/vertline.gif"border=0><img src="../images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="../images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/product/list'/>">产品管理</a></td>

 </tr>

</table>

<!-------------------------产品管理END------------------------------->

<!-------------------------文件管理START------------------------------->

<table border=0 width="98%" align="center"cellspacing="0" cellpadding="0">

 <tr>

   <td colspan="3" language="JavaScript"onMouseUp="turnit('file')" style="CURSOR: hand">

     <img id="Imgfile" src="/images/midclosedfolder.gif"align="absMiddle" border="0" width="16"><img name="Imgfile_0" src="../images/clsfld.gif"align="absMiddle" border="0">

        <fontface=宋体><b>文件管理</b></font>

   </td>

 </tr>

</table>

<table id="menu_file"border=0 width="98%"align="center" cellspacing="0"cellpadding="0" style="display:none">

 <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/uploadfile/list'/>">上传文件管理</a></td>

 </tr>

</table>

<!-------------------------文件管理END------------------------------->

<!-------------------------网站用户管理START------------------------------->

<table border=0 width="98%" align="center"cellspacing="0" cellpadding="0">

 <tr>

   <td colspan="3" language="JavaScript"onMouseUp="turnit('user')" style="CURSOR: hand">

     <img id="Imguser" src="/images/midclosedfolder.gif"align="absMiddle" border="0" width="16"><img name="Imguser_0" src="../images/clsfld.gif"align="absMiddle" border="0">

        <fontface=宋体><b>用户管理</b></font>

   </td>

 </tr>

</table>

<table id="menu_user"border=0 width="98%"align="center" cellspacing="0"cellpadding="0" style="display:none">

 <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/user/list'/>">网站用户管理</a></td>

 </tr>

 <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action="/control/user/query"/>">用户查询</a></td>

 </tr>

</table>

<!-------------------------网站用户管理END------------------------------->

<!-------------------------部门员工管理START------------------------------->

<table border=0 width="98%" align="center"cellspacing="0" cellpadding="0">

 <tr>

   <td colspan="3" language="JavaScript"onMouseUp="turnit('department')" style="CURSOR: hand">

     <img id="Imgdepartment" src="/images/midclosedfolder.gif" align="absMiddle" border="0" width="16"><img name="Imgdepartment_0" src="../images/clsfld.gif" align="absMiddle" border="0">

        <fontface=宋体><b>部门员工管理</b></font>

   </td>

 </tr>

</table>

<table id="menu_department"border=0 width="98%"align="center" cellspacing="0"cellpadding="0" style="display:none">

 <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/department/list'/>">部门管理</a></td>

 </tr>

 <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/employee/list'/>">员工管理</a></td>

 </tr>

 <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/employee/manage'/>?method=query">员工查询</a></td>

 </tr> 

 <tr>

   <td width="50"><img src="/images/vertline.gif"border=0><img src="/images/lastnodeline.gif"align="absMiddle" border=0 width="16"height="22"><img src="/images/doctemp.gif"align="absMiddle" border="0" width="16"height="16"></td>

   <td width="123"><a href="<html:rewrite action='/control/privilegegroup/list'/>">权限组管理</a></td>

 </tr> 

</table>

<!-------------------------部门员工管理END------------------------------->

<table border="0"width="98%" align="center"cellspacing="0" cellpadding="0">

 <tr>

   <td width="20"><img src="../images/lastnodeline.gif"border="0"></td>

   <td>

     <a href="<html:rewrite action='/employee/logout'/>"target="_parent">退出系统</a>

   </td>

 </tr>

</table>

</body>

</html>

Main.jsp

<%@ page contentType="text/html;charset=UTF-8"%>

<%-- <%@ includefile="/WEB-INF/page/share/taglib.jsp" %> --%>

<%@taglib uri="/struts-tags"prefix="s" %>

<html>

<head>

<title>网站业务系统_管理平台</title>

<meta http-equiv="Content-Type"content="text/html; charset=UTF-8">

</head>

    <framesetframespacing="0"border="0"rows="60,*,15"frameborder="0">

        <framename="banner"scrolling="no"noresizetarget="contents"src="<s:urlaction='center-top'/>"marginwidth="0"marginheight="0">

        <framesetcols="168,*">

            <framename="menuframe"target="mainframe"src="<s:urlaction='center-left'/>"scrolling="no"marginwidth="0"marginheight="0">

            <framename="mainframe"scrolling="auto"noresizesrc="<s:urlaction='center-right'/>"marginwidth="0"marginheight="0">

        </frameset>

        <framename="menuframe"target="mainframe"src="<s:urlaction='center-end'/>"scrolling="no"marginwidth="0"marginheight="0">

    </frameset>

    <noframes>

    </noframes>

</html>

producttypelist.jsp

显示产品分类的页面

<%@ page contentType="text/html;charset=UTF-8"%>

<%@taglib uri="/struts-tags"  prefix="s"%>

<html>

<head>

<title>产品类别管理</title>

<meta http-equiv="Content-Type"content="text/html; charset=UTF-8">

<link rel="stylesheet"href="../css/vip.css" type="text/css">

<script language="JavaScript">

<!--

    //到指定的分页页面

    function topage(page){

        var form = document.forms[0];

        form.page.value=page;

        form.submit();

    }

//-->

</script>

<SCRIPT language=JavaScriptsrc="/js/FoshanRen.js"></SCRIPT>

</head>

<body bgcolor="#FFFFFF"text="#000000" marginwidth="0" marginheight="0">

 <table width="98%" border="0"cellspacing="1" cellpadding="2"align="center">

   <tr ><td colspan="6" bgcolor="6f8ac4" align="right">

   第一页,第二页

   </td></tr>

   <tr>

     <td width="8%" bgcolor="6f8ac4"><div align="center"><fontcolor="#FFFFFF">代号</font></div></td>

     <td width="5%" nowrapbgcolor="6f8ac4"><div align="center"><fontcolor="#FFFFFF">修改</font></div></td>

     <td width="20%" bgcolor="6f8ac4"><div align="center"><fontcolor="#FFFFFF">产品类别名称</font></div></td>

      <td width="10%"nowrap bgcolor="6f8ac4"><div align="center"><fontcolor="#FFFFFF">创建下级类别</font></div></td>

      <td width="15%"bgcolor="6f8ac4"><div align="center"><fontcolor="#FFFFFF">所属父类</font></div></td>

      <td nowrapbgcolor="6f8ac4"><div align="center"><fontcolor="#FFFFFF">备注</font></div></td>

   </tr>

<!---------------------------LOOPSTART------------------------------>

   <tr>

     <td bgcolor="f5f5f5"><div align="center">${entry.typeid }</div></td>

     <td bgcolor="f5f5f5"><div align="center"><a href="<s:url action="/control/product/type/manage"/>?method=editUI&typeid=${entry.typeid }">

      <img src="../images/edit.gif"width="15" height="16"border="0"></a></div></td>

     <td bgcolor="f5f5f5"><div align="center"><a href='<s:url action="/control/product/type/list"/>?parentid=${entry.typeid }'>${entry.name }</a></div></td>

      <td bgcolor="f5f5f5"><div align="center"><a href="<s:url action="/control/product/type/manage"/>?method=addUI&parentid=${entry.typeid}">创建子类别</a></div></td>

      <td bgcolor="f5f5f5"align="center"></td>

      <td bgcolor="f5f5f5">${entry.note }</td>

    </tr>

   <!----------------------LOOPEND------------------------------->

   <tr>

     <td bgcolor="f5f5f5" colspan="6"align="center"><table width="100%"border="0" cellspacing="1"cellpadding="3">

          <tr>

            <td width="5%"></td>

              <td width="85%">

              <input name="AddDic"type="button" class="frm_btn"id="AddDic" onClick="javascript:"value="添加类别">  

              <input name="query"type="button" class="frm_btn"id="query" onClick="javascript:"value=" 查询 ">  

            </td>

          </tr>

        </table></td>

   </tr>

 </table>

</body>

</html>

4、struts2的配置

<?xml version="1.0"encoding="UTF-8"?>

<!DOCTYPE struts PUBLIC

    "-//Apache Software Foundation//DTD StrutsConfiguration 2.3//EN"

    "http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>

    <include file="struts-default.xml" />

    <constant name="struts.ObjectFactory" value="spring" /><!--    表示这里面的action由spring进行创建 -->

    <constant name="struts.devMode" value="true" />

    <package name="control" namespace="/control"extends="struts-default">

        <action name="center-*"><!-- 直接跳转,不需要经过class的验证,默认返回success -->

            <result name="success">/page/controlcenter/{1}.jsp</result>

        </action>

        <action name="producttype" class="productTypeAction" method="execute">

            <result name="list">/page/product/producttypelist.jsp</result>

        </action>

    </package>

</struts>

5、接下来我们测试一下页面的效果

我们访问这个网站

http://localhost:8080/babaSport_0700_s2sh_producttype_jsp/control/center-main

我们把产品管理打开

关于网站为什么要这样写,上一篇blog有介绍

6、总结

这里我们的表就可以开始运行了,注意这里我们的表是可以无限分类的,为什么呢?

首先我们产品类别里面比如我们的男装可以再分为上衣和裤子,后面上衣还可以分春天的,夏天的,秋天的,冬天的。。。后面还可以无限分,所以我们有这样的需求,那么我们就要进行分类,类别的子类,子类的子类。。。

怎么办呢?我们的不能为每个类别建一张表吧,而且建表的话,别人几十条分类,那么后面怎么搞???

所以我们的处理方式是:以当前这一个表为基础,以自己的id号为外键,进行连接,我们给表添加一个字段,parentid,如果是顶级分类比如前面的男装,那么他的parentid就是null,而如果不是顶级分类,比如上衣分类,那么parentid就是男装的id号,这样就可以实现无限分类,在同一张表!!!

此处应有掌声:66666666666

时间: 2024-10-21 08:42:45

【j2ee spring】32、巴巴运动网的产品类别页面的相关文章

【j2ee spring】34、巴巴运动网的产品类别管理

巴巴运动网的产品类别管理 1.项目图解 这次我们做的是产品管理的功能,也就是增删改查... 2.首先我们引入相应的jar包 3.我们开始做我们的相应的功能模块 页面的素材我会上传的,链接是:http://download.csdn.net/detail/cutter_point/8803985 这里我们先把上节的有几个工具类补足上来 PageIndex.java /** * 功能:存放第一个页码和最后一个页码 * 时间:2015年5月19日09:06:26 * 文件:PageIndex.java

【j2ee spring】35、巴巴运动网的产品类别管理(2)

巴巴运动网的产品类别管理 1.项目图解 这次我们做的是产品管理的功能,也就是增删改查... 2.首先我们引入相应的jar包 3.我们开始做我们的相应的功能模块 页面的素材我会上传的,链接是:http://download.csdn.net/detail/cutter_point/8803985 好的,这里我们开始对产品类型进行修改和查询操作 ProductTypeAction.java /** * 功能:这个是实现产品类和web层的交互 * 时间:2015年5月16日10:50:36 * 文件:

【j2ee spring】33、巴巴运动网的产品类别展示

巴巴运动网的产品类别展示 1.项目图解 这里面好多页面都是错的,只是个模板,暂时用不上,需要的代码我会全部贴出来,最后做完的时候我会把项目发上来 2.首先我们引入相应的jar包 3.首先我们组装整个页面的整体格局 页面的素材我会上传的,链接是:http://download.csdn.net/detail/cutter_point/8803985 ProductTypeAction.java /** * 功能:这个是实现产品类和web层的交互 * 时间:2015年5月16日10:50:36 *

【j2ee spring】38、巴巴运动网的产品文件的上传

巴巴运动网的产品文件的上传 1.项目图解 2.我们开始做我们的相应的功能模块 页面的素材我会上传的,链接是:http://download.csdn.net/detail/cutter_point/8803985 上传文件的接口类与实现 /** * 功能:这个是文件业务处理的功能接口 * 时间:2015年5月25日09:29:56 * 文件:UploadFileService.java * 作者:cutter_point */ package com.cutter_point.service.u

【j2ee spring】41、巴巴运动网的产品查询

巴巴运动网的产品查询 1.项目图解 2.我们开始做我们的相应的功能模块 页面的素材我会上传的,链接是:http://download.csdn.net/detail/cutter_point/8803985 产品的查询界面query_product.jsp <%@ page isELIgnored="false" contentType="text/html;charset=UTF-8" %> <%@ taglib uri="/strut

【j2ee spring】42、巴巴运动网显示产品样式

巴巴运动网显示产品样式 项目结构 项目代码 底层接口: /** * 功能:这个是品牌样式的接口 * 文件:ProductStyleService.java * 时间:2015年5月31日19:33:19 * 作者:cutter_point */ package com.cutter_point.service.product; import com.cutter_point.service.base.DAO; public interface ProductStyleService extend

【j2ee spring】36、巴巴运动网的产品品牌图片

巴巴运动网的产品品牌图片 1.项目图解 这里做的是图片的存储和显示 2.我们开始做我们的相应的功能模块 页面的素材我会上传的,链接是:http://download.csdn.net/detail/cutter_point/8803985 BrandAction.java /** * 功能:这个是实现品牌类和web层的交互 * 时间:2015年5月23日10:31:07 * 文件:BrandAction.java * 作者:cutter_point */ packagecom.cutter_po

【j2ee spring】40、巴巴运动网的产品添加修改选择

巴巴运动网的产品添加修改选择 1.项目图解 2.我们开始做我们的相应的功能模块 页面的素材我会上传的,链接是:http://download.csdn.net/detail/cutter_point/8803985 产品的添加界面add_product.jsp <%@ page contentType="text/html;charset=utf-8" %> <%@ taglib uri="/struts-tags" prefix="s&

【j2ee spring】39、巴巴运动网的产品信息

巴巴运动网的产品信息 1.项目图解 2.我们开始做我们的相应的功能模块 页面的素材我会上传的,链接是:http://download.csdn.net/detail/cutter_point/8803985 产品显示的接口实现 /** * 功能:这个是产品业务的接口 * 文件:ProductInfoService.java * 时间:2015年5月22日16:48:25 * 作者:cutter_point */ package com.cutter_point.service.product;