资源简介
北大青鸟Y2租房网系统,hibernate+struts2,包含数据库,可运行
代码片段和文件信息
package cn.jbit.houserent.action;
import java.util.HashMap;
import java.util.Map;
import cn.jbit.houserent.biz.UserBiz;
import cn.jbit.houserent.biz.impl.UserBizImpl;
import cn.jbit.houserent.entity.User;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;
@SuppressWarnings(“serial“)
public class LoginAction extends ActionSupport{
private User user=null;
private String message=““;
@SuppressWarnings({ “rawtypes“ “unchecked“ })
public String execute() throws Exception {
UserBiz userBiz = new UserBizImpl();
Map map = new HashMap();
map.put(“name“ user.getName());
map.put(“password“ user.getPassword());
User user = userBiz.loginOrValidate(map);
ActionContext ac = ActionContext.getContext();
Map session = ac.getSession();
if(null != user){
session.put(“user“ user);
return SUCCESS;
}
this.setMessage(“登录失败,请检查用户名和密码是否正确“);
return INPUT;
}
public void validate(){
if(this.user==null || this.getUser().getName().length()==0 ||
this.getUser().getPassword().length()==0){
addFieldError(“error“ ““);
}
}
public User getUser() {
return user;
}
public void setUser(User user) {
this.user = user;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 841 2015-04-15 18:41 HouseRent\.classpath
文件 1042 2015-04-15 18:41 HouseRent\.project
文件 503 2015-04-15 18:41 HouseRent\.settings\.jsdtscope
文件 303 2015-04-19 14:04 HouseRent\.settings\org.eclipse.core.resources.prefs
文件 364 2015-04-15 18:41 HouseRent\.settings\org.eclipse.jdt.core.prefs
文件 481 2015-04-15 18:41 HouseRent\.settings\org.eclipse.wst.common.component
文件 345 2015-04-15 18:41 HouseRent\.settings\org.eclipse.wst.common.project.facet.core.xm
文件 49 2015-04-15 18:41 HouseRent\.settings\org.eclipse.wst.jsdt.ui.superType.container
文件 6 2015-04-15 18:41 HouseRent\.settings\org.eclipse.wst.jsdt.ui.superType.name
文件 2288 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\action\LoginAction.class
文件 1575 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\action\StreamResultAction.class
文件 1951 2015-06-10 10:59 HouseRent\build\classes\cn\jbit\houserent\action\UserAction.class
文件 1166 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\action\UserListAction.class
文件 249 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\biz\DistrictBiz.class
文件 645 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\biz\HouseBiz.class
文件 738 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\biz\impl\DistrictBizImpl.class
文件 1695 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\biz\impl\HouseBizImpl.class
文件 977 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\biz\impl\StreetBizImpl.class
文件 889 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\biz\impl\TypeBizImpl.class
文件 1257 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\biz\impl\UserBizImpl.class
文件 363 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\biz\StreetBiz.class
文件 313 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\biz\TypeBiz.class
文件 445 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\biz\UserBiz.class
文件 249 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\dao\DistrictDao.class
文件 645 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\dao\HouseDao.class
文件 1231 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\dao\impl\DistrictDaoImpl.class
文件 5752 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\dao\impl\HouseDaoImpl.class
文件 1932 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\dao\impl\StreetDaoImpl.class
文件 1628 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\dao\impl\TypeDaoImpl.class
文件 2790 2015-06-09 21:16 HouseRent\build\classes\cn\jbit\houserent\dao\impl\UserDaoImpl.class
............此处省略186个文件信息
评论
共有 条评论