资源简介

基于ssh的网上书店系统的设计与实现 系统完善 仅供参考

资源截图

代码片段和文件信息

package com.action;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.ServletActionContext;
import com.dao.CommonDAO;
import com.model.Car;
import com.model.Sysuser;
import com.opensymphony.xwork2.ActionSupport;
import com.util.Info;
import com.util.Pagination;

public class CarAction extends ActionSupport
{
private Integer id;
private String productid;
private String num;
private String memberid;
String suc;
String no;
private int index=1;
private CommonDAO commonDAO;


public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getProductid() {
return productid;
}
public void setProductid(String productid) {
this.productid = productid;
}
public String getNum() {
return num;
}
public void setNum(String num) {
this.num = num;
}
public String getMemberid() {
return memberid;
}
public void setMemberid(String memberid) {
this.memberid = memberid;
}
public String getSuc() {
return suc;
}
public void setSuc(String suc) {
this.suc = suc;
}
public String getNo() {
return no;
}
public void setNo(String no) {
this.no = no;
}
public int getIndex() {
return index;
}
public void setIndex(int index) {
this.index = index;
}
public CommonDAO getCommonDAO() {
return commonDAO;
}
public void setCommonDAO(CommonDAO commonDAO) {
this.commonDAO = commonDAO;
}

//添加图书到购物车
public void carAdd() throws IOException
{
System.out.println(“aaaaaaaaa“);
    Car car=new Car();
car.setProductid(productid);
car.setNum(num);
car.setMemberid(memberid);
commonDAO.save(car);
 int responseContext;
 responseContext=1;
 
System.out.println(responseContext);
HttpServletResponse response=ServletActionContext.getResponse();
response.setContentType(“text/html“);
PrintWriter out = response.getWriter();
out.println(responseContext);
out.flush();
out.close();

}
//移出图书
public String carDel(){
commonDAO.delete(id “Car“);
suc=““;
return “success“;
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-06-04 10:21  zxtsgx\
     文件         529  2014-04-15 03:38  zxtsgx\.classpath
     目录           0  2014-06-12 23:54  zxtsgx\.myeclipse\
     文件         291  2014-04-17 11:20  zxtsgx\.mymetadata
     文件        1749  2014-04-15 03:43  zxtsgx\.project
     目录           0  2014-06-04 10:21  zxtsgx\.settings\
     文件         493  2014-04-15 03:38  zxtsgx\.settings\.jsdtscope
     文件          87  2014-04-15 03:43  zxtsgx\.settings\org.eclipse.core.resources.prefs
     文件         395  2014-04-15 03:38  zxtsgx\.settings\org.eclipse.jdt.core.prefs
     文件         456  2014-04-15 03:38  zxtsgx\.settings\org.eclipse.wst.common.component
     文件         252  2014-04-15 03:38  zxtsgx\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2014-04-15 03:38  zxtsgx\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2014-04-15 03:38  zxtsgx\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2014-06-04 10:35  zxtsgx\WebRoot\
     目录           0  2014-06-04 10:34  zxtsgx\WebRoot\meta-INF\
     文件          39  2014-04-15 03:39  zxtsgx\WebRoot\meta-INF\MANIFEST.MF
     目录           0  2014-06-04 10:34  zxtsgx\WebRoot\My97DatePicker\
     文件        1389  2014-04-15 03:39  zxtsgx\WebRoot\My97DatePicker\My97DatePicker.htm
     文件        8367  2014-04-15 03:39  zxtsgx\WebRoot\My97DatePicker\WdatePicker.js
     文件       20471  2014-04-15 03:39  zxtsgx\WebRoot\My97DatePicker\calendar.js
     文件         223  2014-04-15 03:39  zxtsgx\WebRoot\My97DatePicker\config.js
     目录           0  2014-06-04 10:34  zxtsgx\WebRoot\My97DatePicker\lang\
     文件         644  2014-04-15 03:39  zxtsgx\WebRoot\My97DatePicker\lang\en.js
     文件        1089  2014-04-15 03:39  zxtsgx\WebRoot\My97DatePicker\lang\zh-cn.js
     文件        1088  2014-04-15 03:39  zxtsgx\WebRoot\My97DatePicker\lang\zh-tw.js
     目录           0  2014-06-04 10:34  zxtsgx\WebRoot\My97DatePicker\skin\
     文件         158  2014-04-15 03:39  zxtsgx\WebRoot\My97DatePicker\skin\WdatePicker.css
     文件        1043  2014-04-15 03:39  zxtsgx\WebRoot\My97DatePicker\skin\datePicker.gif
     目录           0  2014-06-04 10:34  zxtsgx\WebRoot\My97DatePicker\skin\default\
     文件        3726  2014-04-15 03:39  zxtsgx\WebRoot\My97DatePicker\skin\default\datepicker.css
     文件        1578  2014-04-15 03:39  zxtsgx\WebRoot\My97DatePicker\skin\default\img.gif
............此处省略1326个文件信息

评论

共有 条评论