这个查询不需要事务。query.setProperties(user);更好,不然字段多了写死人。理解的不够深刻,写的代码好多费的。
2016-06-14
if(query.list().size()>0){
return true;
}
} catch (Exception e) {
e.printStackTrace();
}finally {
session.close();
}
return false;
}
return true;
}
} catch (Exception e) {
e.printStackTrace();
}finally {
session.close();
}
return false;
}
2016-06-14
public boolean usersLogin(Users user) {
Session session=HibernateSessionFactory.getSession();
try {
String hql="from Users where username=:username and password=:password";
Query query=session.createQuery(hql);
query.setProperties(user);
Session session=HibernateSessionFactory.getSession();
try {
String hql="from Users where username=:username and password=:password";
Query query=session.createQuery(hql);
query.setProperties(user);
2016-06-14
struts2源码下载:http://struts.apache.org/download.cgi#struts25
2016-06-09
HTTP Status 404 - No result defined for action action.UsersAction and result input
type Status report
message No result defined for action action.UsersAction and result input
description The requested resource is not available.
Apache Tomcat/8.0.33
type Status report
message No result defined for action action.UsersAction and result input
description The requested resource is not available.
Apache Tomcat/8.0.33
2016-06-07