• 大小: 19.65MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-28
  • 语言: Java
  • 标签: Javaweb  

资源简介

基于java web的网上花店,也可以作为网上商城,包含完整项目包以及MySQL数据库文件,亲测可用。

资源截图

代码片段和文件信息

package com.action;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.ServletResponseAware;
import org.apache.struts2.interceptor.SessionAware;
import org.apache.struts2.interceptor.RequestAware;

import com.opensymphony.xwork2.ActionSupport;

/**
 * action基类继承自ActionSupport类  
 * 另为使用session对象实现了SessionAware接口
 * 以及RequestAware ServletRequestAware ServletResponseAware接口
 */
public class baseAction extends ActionSupport 
implements SessionAware RequestAware ServletRequestAware ServletResponseAware{
private static final long serialVersionUID = 1L;

private Mapject> session;
private Mapject> request;
private HttpServletRequest servletRequest;
private HttpServletResponse servletResponse;


@Override//重写自父接口SessionAware的方法有容器自行调用并给session对象赋值
public void setSession(Mapject> session) {
this.session = session;
}

@Override//重写自父接口RequestAware的方法有容器自行调用并给request对象赋值
public void setRequest(Mapject> request) {
this.request = request;
}

@Override//重写自父接口ServletRequestAware的方法有容器自行调用并给Servletrequest对象赋值
public void setServletRequest(HttpServletRequest servletRequest) {
this.servletRequest = servletRequest;
}

@Override//重写自父接口ServletResponseAware的方法有容器自行调用并给Servletresponse对象赋值
public void setServletResponse(HttpServletResponse servletResponse) {
this.servletResponse = servletResponse;
}


//用于在子类中获取session对象
public Mapject> getSession(){
return session;
}

//用于在子类中获取request对象
public Mapject> getRequest(){
return request;
}

//用于在子类中获取servletRequest对象
public HttpServletRequest getServletRequest(){
return servletRequest;
}

//用于在子类中获取servletResponse对象
public HttpServletResponse getServletResponse(){
servletResponse.setCharacterEncoding(“utf-8“);
return servletResponse;
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件         290  2017-09-20 11:32  ssh_flower\readme.txt
     目录           0  2017-05-08 18:08  ssh_flower\
     文件         841  2015-04-30 09:44  ssh_flower\.classpath
     文件        1043  2015-04-30 09:46  ssh_flower\.project
     目录           0  2017-05-08 18:08  ssh_flower\.settings\
     文件         503  2012-12-09 15:44  ssh_flower\.settings\.jsdtscope
     文件          84  2017-05-08 18:07  ssh_flower\.settings\org.eclipse.core.resources.prefs
     文件         364  2012-12-09 15:44  ssh_flower\.settings\org.eclipse.jdt.core.prefs
     文件         482  2015-04-30 09:46  ssh_flower\.settings\org.eclipse.wst.common.component
     文件         345  2015-04-30 09:44  ssh_flower\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2012-12-09 15:44  ssh_flower\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2012-12-09 15:44  ssh_flower\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-05-08 18:08  ssh_flower\WebContent\
     目录           0  2017-05-08 18:08  ssh_flower\WebContent\meta-INF\
     文件          39  2016-12-22 09:58  ssh_flower\WebContent\meta-INF\MANIFEST.MF
     目录           0  2017-05-08 18:08  ssh_flower\WebContent\WEB-INF\
     目录           0  2017-05-08 18:08  ssh_flower\WebContent\WEB-INF\lib\
     文件      445288  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\antlr-2.7.7.jar
     文件       53468  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\asm-5.1.jar
     文件       47195  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\asm-commons-5.1.jar
     文件       29130  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\asm-tree-5.1.jar
     文件      497865  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\c3p0-0.9.5.2.jar
     文件       64110  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\classmate-1.3.0.jar
     文件       70282  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\commons-fileupload-1.3.2.jar
     文件      185140  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\commons-io-2.4.jar
     文件      434678  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\commons-lang3-3.4.jar
     文件       61829  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\commons-logging-1.2.jar
     文件      313898  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\dom4j-1.6.1.jar
     文件     1350624  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\freemarker-2.3.23.jar
     文件       75288  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\hibernate-commons-annotations-5.0.1.Final.jar
     文件     6614635  2017-05-08 16:17  ssh_flower\WebContent\WEB-INF\lib\hibernate-core-5.2.9.Final.jar
............此处省略200个文件信息

评论

共有 条评论