package com.ssh.action;
import com.opensymphony.xwork2.ActionSupport;
import com.ssh.service.UserSerivce;
public class UserAction extends ActionSupport {
private static final long serialVersionUID = 1L;
//注入userSerivce接口
private UserSerivce userSerivce;
//属性
//此处的名称应该与jsp中from表单中的name保持一致。
private String userName;
private String userPassword;
@Override
//此测试版本实现的框架的实现,并未考虑到性能、复杂功能,所以只是实现了简单的登录
public String execute() throws Exception {
//getUser 方法返回的 List的size大于0 说明用户存在,则登录成功。
if (userSerivce.getUser(userName, userPassword).size()>0) {
return SUCCESS;
}else{
return ERROR;
}
}
//以下是 get set 方法
public UserSerivce getUserSerivce() {
return userSerivce;
}
public void setUserSerivce(UserSerivce userSerivce) {
this.userSerivce = userSerivce;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserPassword() {
return userPassword;
}
public void setUserPassword(String userPassword) {
this.userPassword = userPassword;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
SSH(spring3.0+strut 2.1+hibernate 3.3+mysql)
共84个文件
jar:54个
xml:8个
java:4个
5星 · 超过95%的资源 需积分: 9 166 下载量 6 浏览量
2013-04-10
10:30:30
上传
评论 2
收藏 14.94MB RAR 举报
温馨提示
此是完整的三大框架项目 环境: Myeclipse 8.6M1 Tomcat 6.0 Mysql 5.2 JDK 1.6 注:因你的数据库不一样,需要更改applicationContext.xml中的dataSource 项
资源推荐
资源详情
资源评论
收起资源包目录
SSH.rar (84个子文件)
SSH
SSH
.project 2KB
.mystrutsdata 240B
.springBeans 462B
.mymetadata 282B
src
struts.xml 683B
applicationContext.xml 2KB
com
ssh
service
UserSerivce.java 219B
action
UserAction.java 1KB
serviceImp
UserServiceImp.java 775B
bean
User.java 885B
User.hbm.xml 798B
.struts.mex 76B
WebRoot
WEB-INF
spring-form.tld 69KB
spring.tld 17KB
classes
struts.xml 683B
applicationContext.xml 2KB
com
ssh
service
UserSerivce.class 292B
action
UserAction.class 1KB
serviceImp
UserServiceImp.class 2KB
bean
User.class 1KB
User.hbm.xml 798B
.struts.mex 76B
lib
org.springframework.expression-3.0.1.RELEASE-A.jar 152KB
hibernate-commons-annotations.jar 65KB
javassist-3.9.0.GA.jar 583KB
org.springframework.binding-2.0.8.RELEASE.jar 154KB
cglib-2.2.jar 272KB
org.springframework.instrument.tomcat-3.0.1.RELEASE-A.jar 5KB
org.springframework.core-3.0.1.RELEASE-A.jar 347KB
jotm.jar 121KB
dom4j-1.6.1.jar 307KB
org.springframework.aop-3.0.1.RELEASE-A.jar 313KB
org.springframework.web-3.0.1.RELEASE-A.jar 352KB
com.springsource.org.apache.commons.pool-1.5.3.jar 95KB
log4j-1.2.14.jar 359KB
persistence.jar 69KB
com.springsource.org.apache.commons.httpclient-3.1.0.jar 301KB
org.springframework.beans-3.0.1.RELEASE-A.jar 535KB
org.springframework.context-3.0.1.RELEASE-A.jar 642KB
struts2-spring-plugin-2.0.14.jar 9KB
ognl-2.6.9.jar 166KB
org.springframework.aspects-3.0.1.RELEASE-A.jar 29KB
org.springframework.webflow-2.0.8.RELEASE.jar 507KB
com.springsource.org.codehaus.jackson.mapper-1.0.0.jar 264KB
org.springframework.web.struts-3.0.1.RELEASE-A.jar 524KB
org.springframework.transaction-3.0.1.RELEASE-A.jar 223KB
slf4j-log4j12-1.5.8.jar 9KB
com.springsource.org.apache.commons.lang-2.4.0.jar 258KB
commons-dbcp.jar 119KB
antlr-2.7.6.jar 433KB
mysql-connector-java-5.1.5-bin.jar 661KB
org.springframework.asm-3.0.1.RELEASE-A.jar 52KB
commons-collections-3.1.jar 546KB
org.springframework.web.servlet-3.0.1.RELEASE-A.jar 389KB
xapool.jar 90KB
org.springframework.jdbc-3.0.1.RELEASE-A.jar 369KB
org.springframework.orm-3.0.1.RELEASE-A.jar 324KB
com.springsource.com.mchange.v2.c3p0-0.9.1.2.jar 603KB
org.springframework.instrument-3.0.1.RELEASE-A.jar 2KB
ehcache-1.2.3.jar 203KB
org.springframework.web.portlet-3.0.1.RELEASE-A.jar 169KB
slf4j-api-1.5.8.jar 23KB
hibernate3.jar 2.31MB
ejb3-persistence.jar 49KB
com.springsource.org.aopalliance-1.0.0.jar 5KB
com.springsource.org.apache.commons.fileupload-1.2.0.jar 53KB
org.springframework.js-2.0.8.RELEASE.jar 1.15MB
com.springsource.net.sf.cglib-2.2.0.jar 319KB
hibernate-annotations.jar 273KB
hibernate-entitymanager.jar 116KB
jta-1.1.jar 13KB
com.springsource.org.apache.commons.logging-1.1.1.jar 60KB
com.springsource.org.apache.log4j-1.2.15.jar 387KB
hibernate-validator.jar 61KB
com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar 1.57MB
org.springframework.oxm-3.0.1.RELEASE-A.jar 56KB
web.xml 1KB
index.jsp 1KB
welcome.jsp 867B
META-INF
MANIFEST.MF 36B
.myeclipse
.myhibernatedata 553B
.settings
org.eclipse.jdt.core.prefs 330B
hibernate.reveng.xml 408B
.classpath 5KB
共 84 条
- 1
xiangyunjiayou
- 粉丝: 8
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
前往页