资源简介
完整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\.myme
文件 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.xm
文件 1227 2013-05-07 12:21 系统\shejiCX\src\log4j.properties
文件 1346 2013-05-07 12:21 系统\shejiCX\src\proxool.xm
............此处省略313个文件信息
相关资源
- ssh框架实现一个小型购物网站
- SSH整合购物车有上传浏览
- SSH图书管理系统源代码家各种开发文
- idea中ssh工程的创建和登陆功能的简单
- SpringMVC实战-雇员薪资管理系统
- 医院管理系统ssh框架实现
- 超级详细通俗易懂-北京动力节点SSH框
- 基于SSH的网上拍卖系统
- SSH网上商城项目实战完整源码
- 传智播客网上书城ssh2改写
- ssh框架实现的购物网站
- 基于SSH的OA管理系统
- 北大青鸟第三单元项目OA系统含数据库
- ssh后台管理zTree
- 很简洁的ssh框架demo
- 基于ssh成绩管理系统
- Shiro和AJAX完美整合
- 基于ssh框架的网上图书商城系统
- SSH框架整合
- 基于SSH的物流管理系统
- ssh框架宠物系统.
- ssh注册登录代码
- 用ssh做的购物车完整版
- ssh网上选课系统
- 会员管理系统(ssh)
- zw_huawsniunai-7733135-SSH.zip
- 资产管理系统AMS.zip
- SSH网上商城 Struts+Hibernate+Spring
- 基于ssh客房信息管理系统
- 网上商城SSH项目.zip
评论
共有 条评论