Results 1 to 5 of 5
Like Tree1Likes
  • 1 Post By Tolls

Thread: Jsp login page using hibernate

  1. #1
    Join Date
    Feb 2012
    Posts
    5
    Rep Power
    0

    Default Jsp login page using hibernate

    Hi,

    I am new to hibernate so, i want to know that how to use hibernate for jsp Login .



    Please Help me......

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default Re: Jsp login page using hibernate

    Where are you stuck?
    KevinWorkman likes this.

  3. #3
    Join Date
    Feb 2012
    Posts
    5
    Rep Power
    0

    Default 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.....

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,120
    Rep Power
    20

    Default 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.

  5. #5
    Join Date
    Feb 2012
    Posts
    5
    Rep Power
    0

Similar Threads

  1. login page
    By banie in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-09-2008, 09:37 AM
  2. JSP login page
    By banie in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 09-06-2008, 05:23 AM
  3. login page
    By keerthi_y19 in forum New To Java
    Replies: 9
    Last Post: 08-06-2008, 12:58 PM
  4. Login page
    By banie in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 07-03-2008, 03:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •