資源簡介
ssh雙數據源登錄.rar

代碼片段和文件信息
package?org.user.action;
import?java.util.List;
import?org.hibernate.Query;
import?org.hibernate.Session;
import?org.hibernate.SessionFactory;
import?com.opensymphony.xwork2.ActionSupport;
@SuppressWarnings(“serial“)
public?class?CustomerAction?extends?ActionSupport?{
private?SessionFactory?sessionFactory;
private?String?username;
private?String?password;
public?SessionFactory?getSessionFactory()?{
return?sessionFactory;
}
public?String?getUsername()?{
return?username;
}
public?void?setUsername(String?username)?{
this.username?=?username;
}
public?String?getPassword()?{
return?password;
}
public?void?setPassword(String?password)?{
this.password?=?password;
}
public?void?setSessionFactory(SessionFactory?sessionFactory)?{
this.sessionFactory?=?sessionFactory;
}
public?String?execute()?throws?Exception?{
Session?session?=?sessionFactory.openSession();
String?hql?=?“from?Customer?u?where?u.username=??and?u.password=?“;
Query?query?=?session.createQuery(hql);
query.setParameter(0?username);
query.setParameter(1?password);
List>?users?=?query.list();
session.close();
if?(users.size()?>?0)?{
return?SUCCESS;
}?else?{
return?ERROR;
}
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2406??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\.classpath
?????目錄??????????0??2010-12-24?11:47??ssh雙數據源登錄\twoSourceLogin\.myeclipse
?????文件????????315??2010-12-24?11:47??ssh雙數據源登錄\twoSourceLogin\.myme
?????文件???????1420??2010-12-24?11:49??ssh雙數據源登錄\twoSourceLogin\.project
?????文件????????500??2010-12-24?11:47??ssh雙數據源登錄\twoSourceLogin\.settings\.jsdtscope
?????文件????????330??2010-12-24?11:47??ssh雙數據源登錄\twoSourceLogin\.settings\org.eclipse.jdt.core.prefs
?????文件?????????49??2010-12-24?11:47??ssh雙數據源登錄\twoSourceLogin\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件??????????6??2010-12-24?11:47??ssh雙數據源登錄\twoSourceLogin\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄??????????0??2010-12-24?11:47??ssh雙數據源登錄\twoSourceLogin\.settings
?????文件???????2585??2010-12-24?11:52??ssh雙數據源登錄\twoSourceLogin\src\applicationContext.xm
?????文件?????????73??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\src\fckeditor.properties
?????文件????????198??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\src\log4j.properties
?????文件???????1272??2010-12-24?12:04??ssh雙數據源登錄\twoSourceLogin\src\org\user\action\CustomerAction.java
?????文件???????1264??2010-12-24?12:04??ssh雙數據源登錄\twoSourceLogin\src\org\user\action\UserAction.java
?????目錄??????????0??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\src\org\user\action
?????文件????????828??2010-12-24?11:58??ssh雙數據源登錄\twoSourceLogin\src\org\user\vo\Customer.hbm.xm
?????文件????????849??2010-12-24?11:57??ssh雙數據源登錄\twoSourceLogin\src\org\user\vo\Customer.java
?????文件???????3521??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\src\org\user\vo\HibernateSessionFactory.java
?????文件????????819??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\src\org\user\vo\User.hbm.xm
?????文件????????847??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\src\org\user\vo\User.java
?????目錄??????????0??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\src\org\user\vo
?????目錄??????????0??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\src\org\user
?????目錄??????????0??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\src\org
?????文件?????????27??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\src\struts.properties
?????文件????????580??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\src\struts.xm
?????目錄??????????0??2010-12-24?11:48??ssh雙數據源登錄\twoSourceLogin\src
?????文件????????879??2010-12-24?11:54??ssh雙數據源登錄\twoSourceLogin\WebRoot\index.jsp
?????文件????????519??2010-12-24?12:05??ssh雙數據源登錄\twoSourceLogin\WebRoot\login.jsp
?????文件????????508??2010-12-24?12:05??ssh雙數據源登錄\twoSourceLogin\WebRoot\login1.jsp
?????文件????????355??2010-12-24?12:06??ssh雙數據源登錄\twoSourceLogin\WebRoot\login_success.jsp
............此處省略28個文件信息
- 上一篇:16*64點陣萬年歷
- 下一篇:SMART 200兩軸畫圓
評論
共有 條評論