• 大小: 40.55MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-17
  • 语言: Java
  • 标签: eclipse  jsp  

资源简介

eclipse + jsp + MySQL+ sevlet

资源截图

代码片段和文件信息

package travel.zyy.action;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionSupport;
import travel.zyy.model.User;
import travel.zyy.service.UserService;

@Scope(“request“)
@Controller(“userAction“)
public class UserAction extends ActionSupport{
/*------------------对象--------------------*/
@Autowired
private UserService userService;
//定义用户名
private String user_name;
//定义密码
private String user_password;
// 定义一个用户
private User user;
/*------------------方法--------------------*/
/**
 * 登录
 * 朱艳燕
 * 2016/3/8
 * @return 跳转值
 * @throws Exception
 */
public String login() throws Exception {
// 向User存入用户名
user.setUser_name(user.getUser_name());
// 登陆方法
user = userService.login(user);
if (user != null) {
            return “LoginSuccess“;
}else{
    return “LoginFalse“;
}
}
/**
 * 注册
 * 朱艳燕
 * 2016/3/9
 * @return flag
 */
public String regist() throws Exception{
//实例化用户
User u = new User();
//向User中存值
u.setUser_name(user.getUser_name());
u.setUser_password(user.getUser_password());
u.setUser_phone(user.getUser_phone());
user.setUser_type(user.getUser_type());
String flag = ““;
//注册方法
if(userService.Ischeck(user)){
if(userService.regist(user)){
flag = “RegistSuccess“;
}else{
flag = “RegistFalse“;
}
}
return flag;

}
public String getUser_name() {
return user_name;
}

public void setUser_name(String user_name) {
this.user_name = user_name;
}

public String getUser_password() {
return user_password;
}

public void setUser_password(String user_password) {
this.user_password = user_password;
}
public User getUser() {
return user;
}

public void setUser(User user) {
this.user = user;
}

public UserService getUserService() {
return userService;
}

public void setUserService(UserService userService) {
this.userService = userService;
}

    
}

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

     文件       1039  2016-03-08 09:14  Travel\.project

     文件        305  2016-03-21 11:04  Travel\.settings\org.eclipse.wst.common.project.facet.core.xml

     文件        364  2016-03-08 09:14  Travel\.settings\org.eclipse.jdt.core.prefs

     文件        470  2016-03-08 09:14  Travel\.settings\org.eclipse.wst.common.component

     文件        567  2016-03-08 09:14  Travel\.settings\.jsdtscope

     文件          6  2016-03-08 09:14  Travel\.settings\org.eclipse.wst.jsdt.ui.superType.name

     文件         49  2016-03-08 09:14  Travel\.settings\org.eclipse.wst.jsdt.ui.superType.container

     文件         57  2016-04-19 22:17  Travel\.settings\org.eclipse.core.resources.prefs

     文件       2240  2016-03-10 10:55  Travel\src\travel\zyy\action\UserAction.java

     文件       2039  2016-03-10 10:46  Travel\src\travel\zyy\dao\impl\UserDaoImpl.java

     文件        308  2016-03-09 10:54  Travel\src\travel\zyy\dao\UserDao.java

     文件        944  2016-03-09 10:53  Travel\src\travel\zyy\service\impl\UserServiceImpl.java

     文件        416  2016-03-09 10:51  Travel\src\travel\zyy\service\UserService.java

     文件       1314  2016-03-10 10:55  Travel\src\travel\zyy\model\User.java

     文件        690  2016-03-10 10:43  Travel\src\travel\zyy\model\UserType.java

     文件        912  2016-03-10 09:34  Travel\src\travel\zyy\model\User.hbm.xml

     文件        745  2016-03-10 09:34  Travel\src\travel\zyy\model\UserType.hbm.xml

     文件        588  2016-03-09 11:02  Travel\src\struts.xml

     文件        421  2015-12-25 20:10  Travel\src\log4j.properties

     文件       1645  2016-04-19 22:17  Travel\build\classes\travel\zyy\model\User.class

     文件       1210  2016-04-19 22:17  Travel\build\classes\travel\zyy\model\UserType.class

     文件        912  2016-03-10 09:34  Travel\build\classes\travel\zyy\model\User.hbm.xml

     文件        745  2016-03-10 09:34  Travel\build\classes\travel\zyy\model\UserType.hbm.xml

     文件       2574  2016-04-19 22:17  Travel\build\classes\travel\zyy\action\UserAction.class

     文件       2336  2016-04-19 22:17  Travel\build\classes\travel\zyy\dao\impl\UserDaoImpl.class

     文件        324  2016-04-19 22:17  Travel\build\classes\travel\zyy\dao\UserDao.class

     文件       1177  2016-04-19 22:17  Travel\build\classes\travel\zyy\service\impl\UserServiceImpl.class

     文件        436  2016-04-19 22:17  Travel\build\classes\travel\zyy\service\UserService.class

     文件        421  2015-12-25 20:10  Travel\build\classes\log4j.properties

     文件        588  2016-03-09 11:02  Travel\build\classes\struts.xml

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

评论

共有 条评论