资源简介
使用java web开发,ssh框架使用,支付流程,订单商品的管理。
代码片段和文件信息
package com.lin.action;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
import org.apache.struts2.util.ServletContextAware;
import org.springframework.beans.factory.annotation.Autowired;
import com.lin.service.AdminService;
import com.lin.service.CustomerService;
import com.lin.service.ShopService;
import com.opensymphony.xwork2.ActionSupport;
public class baseAction extends ActionSupport implements ServletRequestAware
ServletResponseAware ServletContextAware {
private static final long serialVersionUID = 1L;
//常用结果集
public static final String LIST = “list“;
public static final String MODIFY = “modify“;
public static final String MODIFY_SUCCESS = “modify_success“;
public static final String ADD = “add“;
public static final String ADD_SUCCESS = “add_success“;
public static final String SELECT = “select“;
public static final String QUERY = “query“;
public static final String INDEX = “index“;
public static final String MAIN = “main“;
public static final String MANAGER = “manager“;
public static final String REGIST = “regist“;
public static final String MANAGER_LOGIN = “managerLogin“;
public static final String CUSTOMER_LOGIN = “customerLogin“;
public static final String LOGOUT = “logout“;
/*
* 注入Service
*/
@Autowired
protected AdminService adminService;
@Autowired
protected CustomerService customerService;
@Autowired
protected ShopService shopService;
//context
protected HttpServletResponse response;
protected HttpServletRequest request;
protected HttpSession session;
protected ServletContext application;
//分页页数和页大小 默认第一页 一页8个结果
protected int pageNo = 1;
protected int pageSize = 8;
//最大订单
public static final int maxOrders = 50;
//getter and setter
public int getPageNo() {
return pageNo;
}
public void setPageNo(int pageNo) {
this.pageNo = pageNo;
}
public int getPageSize() {
return pageSize;
}
public void setPageSize(int pageSize) {
this.pageSize = pageSize;
}
@Override
public void setServletContext(ServletContext application) {
// TODO Auto-generated method stub
this.application = application;
}
@Override
public void setServletResponse(HttpServletResponse response) {
// TODO Auto-generated method stub
this.response = response;
}
@Override
public void setServletRequest(HttpServletRequest request) {
// TODO Auto-generated method stub
this.request = request;
this.session = this.request.getSession();
}
}
相关资源
- 基于JavaWeb的房屋租赁网站_价值500元的
- JavaWeb通用权限管理的设计
- java-threads2中文版+英文版PDF
- Java面试准备资料大全
- java个人通讯录课程设计源代码
- SSHDroid v2.1.2
- Java Web开发技术大全
- Java核心技术卷2:高级特性原书第9版
- 30天学通Java项目案例开发源码
- java订单系统原型代码
- 超市管理系统JAVA/SSH+MySql
- java访问SAP所用到的jar包集合
- Java编程思想(第二版)-侯捷-简体.
- 学生管理系统SSHStruts2+Spring3.1+Hiberna
- javacv-0.7-bin.zip
- ssh框架实现的员工管理系统
- 图书管理系统mysql+java web
- ffmpeg.exe和jave-2.0.jar获取视频时长
- epub java实现附带源程序、jar包和epub电
- JAVAEE源代码
- Java1.6.0_26
- [Groovy] Making Java Groovy 英文版
- Android Retrofit RxJava RxAndroid完美
- ocr tess4j java demo识别图片技术
- Java How To Program - 10th Edition
- 物流系统毕业设计Java+MySQL+ppt+论文
- java开发的微信公众号管理系统
- 数据结构与算法分析——Java语言描述
- 数据库课程设计-题库管理系统.zip
- 疯狂Java实战演义高清pdf+源码
评论
共有 条评论