资源简介
SSH整合购物车有上传浏览
代码片段和文件信息
/*
* Generated by MyEclipse Struts
* Template path: templates/java/JavaClass.vtl
*/
package com.hygj.action;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.DynaActionForm;
import org.apache.struts.actions.DispatchAction;
import com.hygj.bean.Products;
import com.hygj.dao.ProductDAO;
import com.jspsmart.upload.Request;
import com.jspsmart.upload.SmartUpload;
import com.jspsmart.upload.SmartUploadException;
public class ProductAction extends DispatchAction {
private ProductDAO productDAO;
public ProductDAO getProductDAO() {
return productDAO;
}
public void setProductDAO(ProductDAO productDAO) {
this.productDAO = productDAO;
}
public ActionForward init(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response) {
DynaActionForm productForm = (DynaActionForm) form;// TODO Auto-generated method stub
List list = productDAO.getList();
request.setAttribute(“list“ list);
return mapping.findForward(“list“);
}
public ActionForward add(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response) {
DynaActionForm productForm = (DynaActionForm) form;// TODO Auto-generated method stub
return mapping.findForward(“add“);
}
public ActionForward save(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response) {
DynaActionForm productForm = (DynaActionForm) form;// TODO Auto-generated method stub
Products product = (Products)productForm.get(“product“);
if(product.getId()>0){
productDAO.update(product);
}else{
productDAO.save(product);
}
return mapping.findForward(“init“);
}
public ActionForward update(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response) {
DynaActionForm productForm = (DynaActionForm) form;// TODO Auto-generated method stub
int id=Integer.parseInt(request.getParameter(“id“));
List list=productDAO.getList(id);
Products product = new Products();
if(list.size()>0){
product=(Products)list.get(0);
}
productForm.set(“product“product);
request.setAttribute(“product“ product);
return mapping.findForward(“add“);
}
public ActionForward delete(ActionMapping mapping ActionForm form
HttpServletRequest request HttpServletResponse response) {
DynaActionForm productForm = (DynaActionForm) form;// TODO Auto-generated method stub
int id=Integer.parseInt(request.getParameter(“id“));
List list=productDAO.getList(id);
Products product = new Products();
if(list.size()>0){
product=(Products)l
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-09-01 11:49 SSH整合购物车有上传浏览\DBoracle\
文件 16384 2012-07-30 09:57 SSH整合购物车有上传浏览\DBoracle\data.dmp
文件 27 2012-07-30 09:58 SSH整合购物车有上传浏览\DBoracle\用户名.txt
目录 0 2012-09-01 11:49 SSH整合购物车有上传浏览\SSH\
文件 5307 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\.classpath
目录 0 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\.myeclipse\
文件 531 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\.myhibernatedata
文件 282 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\.myme
文件 240 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\.mystrutsdata
文件 1902 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\.project
文件 462 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\.springBeans
目录 0 2012-09-01 11:49 SSH整合购物车有上传浏览\SSH\src\
文件 2419 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\src\applicationContext.xm
文件 63 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\src\ApplicationResources.properties
目录 0 2012-09-01 11:49 SSH整合购物车有上传浏览\SSH\src\com\
目录 0 2012-09-01 11:49 SSH整合购物车有上传浏览\SSH\src\com\hygj\
目录 0 2012-09-01 11:49 SSH整合购物车有上传浏览\SSH\src\com\hygj\action\
文件 3099 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\src\com\hygj\action\ProductAction.java
文件 2404 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\src\com\hygj\action\UploadAction.java
文件 1206 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\src\com\hygj\action\UsersAction.java
目录 0 2012-09-01 11:49 SSH整合购物车有上传浏览\SSH\src\com\hygj\bean\
文件 1204 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\src\com\hygj\bean\Products.hbm.xm
文件 1292 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\src\com\hygj\bean\Products.java
文件 818 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\src\com\hygj\bean\Users.hbm.xm
文件 825 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\src\com\hygj\bean\Users.java
目录 0 2012-09-01 11:49 SSH整合购物车有上传浏览\SSH\src\com\hygj\dao\
文件 1168 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\src\com\hygj\dao\ProductDAO.java
文件 550 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\src\com\hygj\dao\UsersDAO.java
目录 0 2012-09-01 11:49 SSH整合购物车有上传浏览\SSH\src\com\hygj\filter\
文件 761 2012-07-30 09:55 SSH整合购物车有上传浏览\SSH\src\com\hygj\filter\MyFilter.java
目录 0 2012-09-01 11:49 SSH整合购物车有上传浏览\SSH\WebRoot\
............此处省略105个文件信息
相关资源
- SSH图书管理系统源代码家各种开发文
- idea中ssh工程的创建和登陆功能的简单
- SpringMVC实战-雇员薪资管理系统
- idea中ssm框架整合
- idea整合ssm增删改查
- 医院管理系统ssh框架实现
- 超级详细通俗易懂-北京动力节点SSH框
- 基于SSH的网上拍卖系统
- SSH网上商城项目实战完整源码
- 传智播客网上书城ssh2改写
- ssh框架实现的购物网站
- springmvc整合
- spring+springMvc+mybatis完美整合项目
- 基于SSH的OA管理系统
- 北大青鸟第三单元项目OA系统含数据库
- ssh后台管理zTree
- ApabiReader4.4和4.5破解 打印 期限,完美
- Spring+SpringMVC+MyBatis整合工程代码
- 很简洁的ssh框架demo
- 基于ssh成绩管理系统
- Shiro和AJAX完美整合
- FlyBox企业网盘和ERP源码,可整合
- SSI整合
- Activiti5.8+SpringMVC整合工作流案例
- 基于ssh框架的网上图书商城系统
- SSH框架整合
- 基于SSH的物流管理系统
- ssh框架宠物系统.
- ssh注册登录代码
- Axure整合资源
评论
共有 条评论