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
精彩评论