• 大小: 21.71MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-07-03
  • 语言: 其他
  • 标签: SSH  物业管理  

资源简介

完整SSH的小区物业管理系统的设计与实现

资源截图

代码片段和文件信息

package bishe.action;


import java.io.IOException;
import java.util.Date;

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

import org.apache.struts2.ServletActionContext;

import bishe.dao.FangchanDao;
import bishe.dao.JiaofeiDao;
import bishe.dao.TousuDao;
import bishe.dao.UserDao;
import bishe.dao.WeixiuDao;
import bishe.dao.ZhuhuDao;
import bishe.model.Fangchan;
import bishe.model.Jiaofei;
import bishe.model.Tousu;
import bishe.model.User;
import bishe.model.Weixiu;
import bishe.model.Zhuhu;
import bishe.util.Pager;


import com.opensymphony.xwork2.ActionSupport;

public class ManageAction extends ActionSupport{


private static final long serialVersionUID = -4304509122548259589L;

private UserDao userDao;

private String url = “./“;


public UserDao getUserDao() {
return userDao;
}

public void setUserDao(UserDao userDao) {
this.userDao = userDao;
}

public String getUrl() {
return url;
}

public void setUrl(String url) {
this.url = url;
}

//程序入口界面
public String index(){
HttpServletRequest request = ServletActionContext.getRequest();
HttpSession session = request.getSession();
User user = (User)session.getAttribute(“user“);
if(user==null){
return “success2“;
}else{
return “success1“;
}
}


//用户登录操作
public String login() throws IOException {
HttpServletRequest request = ServletActionContext.getRequest();
String username = request.getParameter(“username“);
String password = request.getParameter(“password“);
User user = userDao.selectBean(“ where username = ‘“+username +“‘ and password= ‘“+password +“‘ and userlock=0 “);
if (user!=null) {
HttpSession session = request.getSession();
session.setAttribute(“user“ user);
this.setUrl(“index“);
return “redirect“;
} else {
HttpServletResponse response = ServletActionContext.getResponse();
response.setCharacterEncoding(“gbk“);
response
.getWriter()
.print(
ript language=javascript>alert(‘用户名或者密码错误‘);window.location.href=‘login.jsp‘;ript>“);
}
return null;
}

//用户退出操作
public String loginout() {
HttpServletRequest request = ServletActionContext.getRequest();
HttpSession session = request.getSession();
session.removeAttribute(“user“);
this.setUrl(“login.jsp“);
return SUCCESS;
}


//跳转到修改密码页面
public String changepwd() {
this.setUrl(“user/password.jsp“);
return SUCCESS;
}

//修改密码操作
public void changepwd2() throws IOException {
HttpServletRequest request = ServletActionContext.getRequest();

HttpSession session = request.getSession();
User u = (User)session.getAttribute(“user“);
String password1 = request.getParameter(“password1“);
String password2 = request.getParameter(“password2“);
User bean = userDao.selectBean(“ where username= ‘“+u.getUsername()+“‘ and pa

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

     文件       5052  2013-05-07 12:19  系统\shejiCX\.classpath

     文件        294  2013-05-07 12:15  系统\shejiCX\.mymetadata

     文件       1225  2013-05-07 12:32  系统\shejiCX\.project

     文件         88  2013-05-07 12:16  系统\shejiCX\.settings\org.eclipse.core.resources.prefs

     文件        330  2013-05-07 12:14  系统\shejiCX\.settings\org.eclipse.jdt.core.prefs

     文件        585  2013-05-07 12:16  系统\shejiCX\.settings\org.eclipse.wst.validation.prefs

     文件      47084  2013-05-07 12:21  系统\shejiCX\src\bishe\action\ManageAction.java

     文件        467  2013-05-07 12:21  系统\shejiCX\src\bishe\dao\FangchanDao.java

     文件       1684  2013-05-07 12:21  系统\shejiCX\src\bishe\dao\impl\FangchanDaoImpl.java

     文件       1663  2013-05-07 12:21  系统\shejiCX\src\bishe\dao\impl\JiaofeiDaoImpl.java

     文件       1621  2013-05-07 12:21  系统\shejiCX\src\bishe\dao\impl\TousuDaoImpl.java

     文件       1600  2013-05-07 12:21  系统\shejiCX\src\bishe\dao\impl\UserDaoImpl.java

     文件       1642  2013-05-07 12:21  系统\shejiCX\src\bishe\dao\impl\WeixiuDaoImpl.java

     文件       1621  2013-05-07 12:21  系统\shejiCX\src\bishe\dao\impl\ZhuhuDaoImpl.java

     文件        457  2013-05-07 12:21  系统\shejiCX\src\bishe\dao\JiaofeiDao.java

     文件        437  2013-05-07 12:21  系统\shejiCX\src\bishe\dao\TousuDao.java

     文件        427  2013-05-07 12:21  系统\shejiCX\src\bishe\dao\UserDao.java

     文件        447  2013-05-07 12:21  系统\shejiCX\src\bishe\dao\WeixiuDao.java

     文件        437  2013-05-07 12:21  系统\shejiCX\src\bishe\dao\ZhuhuDao.java

     文件       2227  2013-05-07 12:21  系统\shejiCX\src\bishe\model\Fangchan.java

     文件       2580  2013-05-07 12:21  系统\shejiCX\src\bishe\model\Jiaofei.java

     文件       1892  2013-05-07 12:21  系统\shejiCX\src\bishe\model\Tousu.java

     文件       1802  2013-05-07 12:21  系统\shejiCX\src\bishe\model\User.java

     文件       1896  2013-05-07 12:21  系统\shejiCX\src\bishe\model\Weixiu.java

     文件       1655  2013-05-07 12:21  系统\shejiCX\src\bishe\model\Zhuhu.java

     文件       1720  2013-05-07 12:21  系统\shejiCX\src\bishe\util\Pager.java

     文件       2567  2013-05-07 12:21  系统\shejiCX\src\bishe\util\Util.java

     文件       1346  2013-05-07 12:21  系统\shejiCX\src\hibernate.cfg.xml

     文件       1227  2013-05-07 12:21  系统\shejiCX\src\log4j.properties

     文件       1346  2013-05-07 12:21  系统\shejiCX\src\proxool.xml

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

评论

共有 条评论