开发者

how can i use hibernate to loging in a jsp page

im using hibernate with my jsp page and mySQL , i know just how to save a session like that :

<%Session hibernateSession = MyDB.HibernateUtil.currentSession();  Transaction tx = hibernateSession.beginTransaction(); 
Student std = new Student(); 
std.setUserName("Da开发者_StackOverflow中文版vid");
hibernateSession.save(std);%>

, but how can i selecte from a table and print it like in mysql select * from student wher userName = *** and how can i update ?

finaly can i use hibernate in Login ?


Refer this for complete HQL help: http://docs.jboss.org/hibernate/core/3.3/reference/en/html/queryhql.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜