Results 1 to 5 of 5
Thread: Jsp login page using hibernate
- 02-15-2012, 01:26 PM #1
Member
- Join Date
- Feb 2012
- Posts
- 5
- Rep Power
- 0
- 02-15-2012, 02:12 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: Jsp login page using hibernate
Where are you stuck?
- 02-16-2012, 06:23 AM #3
Member
- Join Date
- Feb 2012
- Posts
- 5
- Rep Power
- 0
Re: Jsp login page using hibernate
Hi Tolls,
First of all Thanks for reply me.
I have created a jsp Page which contain two field user name and password and a login button. i have also create pojo class and deo class, two xml hibernate.cfg.xml, login.hbm.xml and do proper mapping. but i don't know how to implement this deo class in jsp page. so please tell me proper flow how to access this deo class in jsp.
please please tell me.....
- 02-16-2012, 09:31 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,438
- Rep Power
- 16
Re: Jsp login page using hibernate
Do it in a servlet, not a JSP, for starters.
The simplest technique for logging someone into a website is to check their credentials (ie use your DAO to check the username and password) and then stick the resulting bean into the session. On a successful login forward to your first JSP page for your site (JSPs should just display data, they shouldn't do any data gathering except in very rare instances), on a failure go back to your login page.
Then you can just check whether that bean exists in the session whenever someone tries something on that site. If the bean exists, great. If not forward to login page.
That should give you enough to work with...get the servlet working first, and don't worry about the JSP. Once you have that the rest should be easier.
- 02-16-2012, 06:46 PM #5
Member
- Join Date
- Feb 2012
- Posts
- 5
- Rep Power
- 0
Similar Threads
-
login page
By banie in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 09-09-2008, 08:37 AM -
JSP login page
By banie in forum JavaServer Pages (JSP) and JSTLReplies: 1Last Post: 09-06-2008, 04:23 AM -
login page
By keerthi_y19 in forum New To JavaReplies: 9Last Post: 08-06-2008, 11:58 AM -
Login page
By banie in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 07-03-2008, 02:05 PM


1Likes
LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks