Results 1 to 8 of 8
Like Tree2Likes
  • 2 Post By SurfMan

Thread: Login and Registration using Sevlets

  1. #1
    gevin20 is offline Member
    Join Date
    Mar 2014
    Posts
    10
    Rep Power
    0

    Default Login and Registration using Sevlets

    can anyone give me complete login and registration tutorial link consisting of Login,Register,Logout with JDBC connection and Session Management ??

  2. #2
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,746
    Rep Power
    5

    Default Re: Login and Registration using Sevlets

    ... for every web framework and server container available for the Java platform? You'll have to be more specific.
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

  3. #3
    gevin20 is offline Member
    Join Date
    Mar 2014
    Posts
    10
    Rep Power
    0

    Default Re: Login and Registration using Sevlets

    I dont want to use any framework only servlet and JSP/HTML

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,851
    Rep Power
    19

    Default Re: Login and Registration using Sevlets

    You're as likely to find a tutorial that covers this stuff as we are...
    Google's not that complicated.

    Have you thought about looking for the individual bits?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    926
    Rep Power
    2

    Default Re: Login and Registration using Sevlets

    The problem you are facing is huge (in your world that is), but it isn't. Let me show you why: your problem consists of only a few small problems which individually are easy to solve:
    - Design a database that can hold your registration data
    - Create a HTML form
    - Write a receiving servlet
    - Prepare statement to check credentials or store registration
    - Redirect the user to the result page.

    That's all there is to it. These steps together make it work. Keep "problems" small and break it down to the essentials.
    gimbal2 and Omega Goon like this.
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  6. #6
    Join Date
    Apr 2014
    Posts
    46
    Rep Power
    0

    Default Re: Login and Registration using Sevlets


  7. #7
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    926
    Rep Power
    2

    Default Re: Login and Registration using Sevlets

    Quote Originally Posted by itswebin@gmail.com View Post
    That example sucks monkeyballs. Two words: "Bobby Tables"...
    Java Code:
    String user = request.getParameter("uname");   
    String pwd = request.getParameter("pass");
    String fname = request.getParameter("fname");
    String lname = request.getParameter("lname");
    String email = request.getParameter("email");
    int i = st.executeUpdate("insert into members(first_name, last_name, email, uname, pass, regdate) values ('" + fname + "','" + lname + "','" + email + "','" + user + "','" + pwd + "', CURDATE())");
    This example is prone to SQL injection, which makes me question the overall quality of the example. My advice: go craft a page + servlet etc yourself. It's much more fun, much more educational, and you don't get sucked into pitfalls that others have blindly copied from others...
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2 2013

  8. #8
    gimbal2 is offline Just a guy
    Join Date
    Jun 2013
    Location
    Netherlands
    Posts
    3,746
    Rep Power
    5

    Default Re: Login and Registration using Sevlets

    to be fair: the OP asked for a complete example, not a GOOD example ;)
    "Syntactic sugar causes cancer of the semicolon." -- Alan Perlis

Similar Threads

  1. Replies: 0
    Last Post: 09-15-2013, 05:24 PM
  2. Replies: 6
    Last Post: 10-22-2012, 02:12 PM
  3. help in registration
    By katrinax_caren02 in forum JDBC
    Replies: 1
    Last Post: 09-27-2009, 03:46 PM
  4. Replies: 0
    Last Post: 06-25-2008, 12:41 PM
  5. Registration Servlet
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 12-25-2007, 11:22 AM

Posting Permissions

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