• 大小: 11.23MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-12
  • 语言: 其他
  • 标签: spring  struts2  hibernate  

资源简介

spring struts2 hibernate demo

资源截图

代码片段和文件信息

package com.isoftstone.ssh.common.core;

import java.util.Map;

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

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.struts2.ServletActionContext;
import org.apache.struts2.dispatcher.multipart.MultiPartRequest;
import org.apache.struts2.dispatcher.multipart.MultiPartRequestWrapper;
import org.apache.struts2.interceptor.ParameterAware;
import org.apache.struts2.interceptor.SessionAware;

import com.opensymphony.xwork2.ActionSupport;
import com.opensymphony.xwork2.ModelDriven;

/**
 * Action抽象父类
 * 
 * @author hfcui
 * 
 */
public abstract class AbstractAction extends ActionSupport implements
ModelDrivenject> SessionAware ParameterAware {

private static final long serialVersionUID = 1054989255154530553L;

/**
 * webwork的会话的属性Map
 */
protected Map session;

/**
 * 用户请求数据Map
 */
protected Map parameters;

protected final Log logger = LogFactory.getLog(this.getClass());

/**
 * Dispatch结果类型字符串
 */
public static final String UNAUTHORIZED = “unauthorized“;


public object getModel() {
return this.getViewModel();
}

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

public void setParameters(Map parameters) {
this.parameters = parameters;
}

/**
 * 获取Web应用上下文中的属性哈希表
 * 
 * @return Application
 */
protected Map getApplication() {
return ServletActionContext.getContext().getApplication();

}

/**
 * 获取当前会话的属性Map
 * 
 * @return session
 */
protected Map getSession() {
return session;
}

/**
 * 获取请求参数
 * 
 * @return parameters
 */
protected Map getParameters() {
return parameters;
}

/**
 * 获得 HttpServletRequest
 * 
 * @return
 */
public HttpServletRequest getRequest() {
return ServletActionContext.getRequest();
}

/**
 * 获得 HttpServletResponse
 * 
 * @return
 */
public HttpServletResponse getResponse() {
return ServletActionContext.getResponse();
}

/**
 * 获取文件上传请求对象
 * 
 * @return
 */

public MultiPartRequest getMultiPartRequest() {
if (this.getRequest() instanceof MultiPartRequestWrapper) {
return (MultiPartRequest) getRequest();
}
return null;
}

public abstract object getViewModel();

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        663  2009-07-13 12:31  ssh_demo\.classpath

     文件       1041  2009-07-09 12:58  ssh_demo\.project

     文件        454  2009-07-09 12:58  ssh_demo\.settings\.jsdtscope

     文件        260  2009-07-13 12:31  ssh_demo\.settings\org.eclipse.core.resources.prefs

     文件        330  2009-07-09 12:58  ssh_demo\.settings\org.eclipse.jdt.core.prefs

     文件        375  2009-07-10 11:12  ssh_demo\.settings\org.eclipse.jst.common.project.facet.core.prefs

     文件        578  2009-07-13 12:31  ssh_demo\.settings\org.eclipse.wst.common.component

     文件        269  2009-07-10 11:12  ssh_demo\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件         49  2009-07-09 12:58  ssh_demo\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件          6  2009-07-09 12:58  ssh_demo\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件       2513  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\common\core\AbstractAction.class

     文件        542  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\common\core\AbstractStandardAction.class

     文件        126  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\common\core\baseDAO.class

     文件        409  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\common\core\baseEntity.class

     文件       1136  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\common\core\baseService.class

     文件       1212  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\common\core\BusinessException.class

     文件        833  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\common\core\ProjectException.class

     文件        126  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\common\core\Service.class

     文件       1576  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\common\util\AbstractAuthInterceptor.class

     文件       1539  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\common\util\AuthenticationInterception.class

     文件        805  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\common\util\ExportDB.class

     文件       1885  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\common\util\MyI18nMessageSource.class

     文件       1579  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\demo\biz\service\impl\UserPojoService.class

     文件        454  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\demo\biz\service\UserService.class

     文件       1045  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\demo\entity\User.class

     文件        499  2009-07-10 10:16  ssh_demo\build\classes\com\isoftstone\ssh\demo\entity\User.hbm.xml

     文件       2686  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\demo\integration\dao\impl\UserHibernateDAO.class

     文件        496  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\demo\integration\dao\UserDAO.class

     文件       1225  2009-07-14 12:35  ssh_demo\build\classes\com\isoftstone\ssh\demo\test\UserTest.class

     文件        522  2009-07-14 10:35  ssh_demo\build\classes\com\isoftstone\ssh\demo\web\action\LoginAction-validation.xml

............此处省略130个文件信息

评论

共有 条评论