资源简介
salesOnline购物车与订单.rar
代码片段和文件信息
package action;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.wy.dao.GoodsDao;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import java.util.*;
public class goodsaction extends Action {
private int action;
private GoodsDao dao=null;
public ActionForward execute(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response)
throws Exception {
request.setCharacterEncoding(“gb2312“);
action = Integer.parseInt(request.getParameter(“action“));
dao = new GoodsDao();
switch(action){
case 13 : {
return this.goodselectbighead(mapping form request response);
}
case 15 :{
return this.goodselect(mapping form request response);
}
case 16:{
return this.goodselectid(mapping form request response);
}
}
return null;
}
public ActionForward goodselectid(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response)
throws Exception {
List list = null;
String id = request.getParameter(“id“);
list = dao.selectid(Integer.valueOf(id));
request.setAttribute(“list“ list);
return mapping.findForward(“shopcar“);
}
public ActionForward goodselectbighead(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response)
throws Exception {
List list = null;
String big = request.getParameter(“big“);
list = dao.selectbig(Integer.valueOf(big));
int pageNumber = list.size();
int maxPage = pageNumber;
String number = request.getParameter(“i“);
if(maxPage%4==0){
pageNumber = maxPage/4;
}else{
pageNumber = maxPage/4+1;
}
if(number==null){
number = “0“;
}
request.setAttribute(“pageNumber“ String.valueOf(pageNumber));
request.setAttribute(“number“ String.valueOf(number));
request.setAttribute(“maxPage“ String.valueOf(maxPage));
request.setAttribute(“list“ list);
return mapping.findForward(“goodselectbighead“);
}
public ActionForward goodselect(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response)
throws Exception {
List list = null;
String mark = request.getParameter(“mark“);
list = dao.selectMark(Integer.valueOf(mark));
int pageNumber = list.size();
int maxPage = pageNumber;
String number = request.getParameter(“i“);
if(maxPage%4==0){
pageNumber = maxPage/4;
}else{
pageNumber = maxPage/4+1;
}
if(number==null){
number = “0“;
}
request.setAttribute(“pageNumber“ String.valueOf(pageNumber));
request.setAttribute(“number“ String.valueOf(number));
request.setAttribute(“maxPage“ String.valueOf(maxPage));
request.setAttribute(“list“ list);
// request.setAttribute(“smallList“ );
return ma
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 1312 2009-04-24 17:36 salesOnline购物车与订单\.project
文件 306 2009-04-24 17:34 salesOnline购物车与订单\.myme
文件 569 2009-04-24 19:56 salesOnline购物车与订单\.classpath
文件 240 2009-04-24 17:35 salesOnline购物车与订单\.mystrutsdata
文件 1007 2009-04-24 20:35 salesOnline购物车与订单\WebRoot\index.jsp
文件 836 2009-04-24 17:40 salesOnline购物车与订单\WebRoot\error.jsp
文件 903 2009-04-24 18:11 salesOnline购物车与订单\WebRoot\logo.jsp
文件 1387 2009-04-26 21:29 salesOnline购物车与订单\WebRoot\task.jsp
文件 1466 2009-04-26 18:15 salesOnline购物车与订单\WebRoot\checkMemberResult.jsp
文件 917 2009-04-24 20:54 salesOnline购物车与订单\WebRoot\logout.jsp
文件 4594 2009-04-30 12:35 salesOnline购物车与订单\WebRoot\selectfreegoods.jsp
文件 4486 2009-04-30 12:35 salesOnline购物车与订单\WebRoot\selectbiggoods.jsp
文件 2824 2009-04-29 21:29 salesOnline购物车与订单\WebRoot\top3.jsp
文件 2326 2009-04-29 20:39 salesOnline购物车与订单\WebRoot\buy.jsp
文件 1679 2009-04-26 20:57 salesOnline购物车与订单\WebRoot\addintoshopcar.jsp
文件 4729 2009-04-28 21:06 salesOnline购物车与订单\WebRoot\checkshopcar.jsp
文件 901 2009-04-28 18:48 salesOnline购物车与订单\WebRoot\clearshopcar.jsp
文件 1523 2009-04-28 19:36 salesOnline购物车与订单\WebRoot\modify.jsp
文件 4671 2009-04-30 13:04 salesOnline购物车与订单\WebRoot\carcheckout.jsp
文件 2566 2009-04-29 20:54 salesOnline购物车与订单\WebRoot\checkOutOrder.jsp
文件 723 2009-04-26 14:37 salesOnline购物车与订单\WebRoot\jsppages\main.jsp
文件 532 2009-04-24 18:10 salesOnline购物车与订单\WebRoot\jsppages\dec.jsp
文件 3132 2009-04-26 18:13 salesOnline购物车与订单\WebRoot\jsppages\land.jsp
文件 2158 2009-04-26 15:25 salesOnline购物车与订单\WebRoot\jsppages\kind.jsp
文件 9395 2009-04-24 18:10 salesOnline购物车与订单\WebRoot\image\computer1.gif
文件 28093 2009-04-24 18:10 salesOnline购物车与订单\WebRoot\image\logo.jpg
文件 12600 2009-04-24 18:10 salesOnline购物车与订单\WebRoot\image\mousein.jpg
文件 1743 2009-04-24 21:04 salesOnline购物车与订单\WebRoot\image\land.gif
文件 12600 2009-04-26 10:13 salesOnline购物车与订单\WebRoot\image\fg_top04.jpg
文件 28881 2009-04-26 10:37 salesOnline购物车与订单\WebRoot\image\fg_right02.jpg
............此处省略78个文件信息
相关资源
- ed96zm.rar
- 大数据百度云网盘资源.txt
- 数字图像处理第2版刚萨雷斯-书及全套
- 工具.rar
- SimpleReuseStrategy.ts
- vip7.zip
- 20170526154614428.Net程序突破内存2G访问限
- 2014-Verbal(SHL)大汇总(60道)更新至
- ESXivCenter安装镜像提取码.txt
- 靶机搭建7套.txt
- 解密密码.txt
- DevExpress.Localization.v10.2.3(汉化_来自
- 直流电机控制.zip
- PC与MCU通讯.zip
- 火车售票系统.zip
- 单片机教学打铃控制器.rar
- 老赵讲C.txt
- 448421COMP86.rar
- encmkh.rar
- 尚硅谷springboot视频.txt
- (IDMAllProductsKeygenv3.6)keygen.rar
- 梯度锐化的方法----微分法;图像边缘
- 时钟.c
- 基于Web的资源共享网站的设计与实现
- 软考BD云链接.txt
- dpc.slx
- zencart文件类型分布图.pdf
- xJPG.rar
- LDPC.zip
- 浅层神经网络工具函数.zip
评论
共有 条评论