资源简介

模仿当当网模式,java实现的购物网站源码!

资源截图

代码片段和文件信息

package tarena.dangdang.action;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.interceptor.ApplicationAware;
import org.apache.struts2.interceptor.ServletRequestAware;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;

public abstract class DangAction implements ActionSessionAwareServletRequestAwareApplicationAware{
protected Map session;

protected HttpServletRequest request;

protected Map application;

protected ActionContext ac;

public DangAction(){
 ac = ActionContext.getContext();
}

public void clearSession(){
session.clear();
}

public void clearApplication(){
application.clear();
}

public void put(String keyobject value){
ac.put(key value);
}

public object get(String key){
if(key == null || ““.equals(key)){
return null;
}
return ac.get(key);
}

public String execute() throws Exception {
return null;
}

public void setSession(Mapject> session) {
this.session = session;
}

public void setServletRequest(HttpServletRequest req) {
this.request = req;
}
public void setApplication(Mapject> application){
this.application = application;
}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-10-17 22:24  dangdang\
     文件        2346  2012-10-17 21:37  dangdang\.classpath
     目录           0  2010-04-01 23:44  dangdang\.metadata\
     文件           0  2010-04-01 23:44  dangdang\.metadata\.lock
     文件        4555  2010-04-01 23:47  dangdang\.metadata\.log
     目录           0  2010-04-01 23:47  dangdang\.metadata\.plugins\
     目录           0  2010-04-01 23:44  dangdang\.metadata\.plugins\com.genuitec.eclipse.desktop\
     文件          77  2010-04-01 23:47  dangdang\.metadata\.plugins\com.genuitec.eclipse.desktop\dialog_settings.xml
     目录           0  2012-10-17 23:01  dangdang\.metadata\.plugins\com.genuitec.eclipse.hibernate\
     目录           0  2010-04-01 23:44  dangdang\.metadata\.plugins\com.genuitec.eclipse.sqlexplorer\
     文件         822  2010-04-01 23:44  dangdang\.metadata\.plugins\com.genuitec.eclipse.sqlexplorer\ConnectionProfiles.xml
     文件       15927  2010-04-01 23:44  dangdang\.metadata\.plugins\com.genuitec.eclipse.sqlexplorer\SQLDrivers.xml
     目录           0  2010-04-01 23:44  dangdang\.metadata\.plugins\com.genuitec.org.hibernate.eclipse\
     文件           0  2010-04-01 23:44  dangdang\.metadata\.plugins\com.genuitec.org.hibernate.eclipse\hibernate-tools.log
     目录           0  2010-04-01 23:44  dangdang\.metadata\.plugins\org.eclipse.core.resources\
     目录           0  2012-10-17 23:01  dangdang\.metadata\.plugins\org.eclipse.core.resources\.history\
     目录           0  2010-04-01 23:47  dangdang\.metadata\.plugins\org.eclipse.core.resources\.root\
     目录           0  2010-04-01 23:44  dangdang\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes\
     文件           1  2010-04-01 23:47  dangdang\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes\history.version
     文件          57  2010-04-01 23:44  dangdang\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes\properties.index
     文件           1  2010-04-01 23:47  dangdang\.metadata\.plugins\org.eclipse.core.resources\.root\.indexes\properties.version
     文件          77  2010-04-01 23:47  dangdang\.metadata\.plugins\org.eclipse.core.resources\.root\5.tree
     目录           0  2010-04-01 23:47  dangdang\.metadata\.plugins\org.eclipse.core.resources\.safetable\
     文件         348  2010-04-01 23:47  dangdang\.metadata\.plugins\org.eclipse.core.resources\.safetable\org.eclipse.core.resources
     目录           0  2010-04-01 23:44  dangdang\.metadata\.plugins\org.eclipse.core.runtime\
     目录           0  2010-04-01 23:47  dangdang\.metadata\.plugins\org.eclipse.core.runtime\.settings\
     文件          80  2010-04-01 23:44  dangdang\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.eclipse.derby.prefs
     文件          94  2010-04-01 23:44  dangdang\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.eclipse.easie.bejy.prefs
     文件          94  2010-04-01 23:44  dangdang\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.eclipse.easie.core.prefs
     文件          94  2010-04-01 23:44  dangdang\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.eclipse.easie.geronimo1.prefs
     文件          94  2010-04-01 23:44  dangdang\.metadata\.plugins\org.eclipse.core.runtime\.settings\com.genuitec.eclipse.easie.geronimo2.prefs
............此处省略692个文件信息

评论

共有 条评论