User's Autentication/Login Page Using Java Servlet and M.S.Access/SQL Database [Advanced Java Programming]


Home
 »  Java  »  Advance Java  »  Java Servlet  »  User's Autentication Page



Today, in programming everybody wants login page of own website, where a user simple enter own UserName and Password and then further.... here required of users , very simple java programms. The following are two programs one Java Servlet Server side and one HTML Client Side. HTML Program Admin/User's Autentication Page where Admin/User will enter own UserName and Password, If both are correct then records will open from M.S.Acces's Table [Authenticated] and welcome page will open, If both are incorrect then error page will open and try again message will display. Both programs are very simple & easy to use, For this first of all you need to create a M.S.Access database or SQL... but in this example I'm using M.S.Access. Create one table in M.S Access as shown below:


Table Definitions:

Table Name: [Authenticated.mdb] - Download
Primary Key: ID
Foreign Key: Nil

Column Definition:
Column NameData Type
IDAutoNumber
UserNameText
PasswordText

Table Description:
Column NameDescription
IDCreate AutoNumber for UserID
UserNamefor a UserName for example Bintu or something....
Passwordfor a Password for example 123456 or something...


User's Autentication Table


All_Classes_2011_12 Table



After create table in M.S. Access database now you will create DSN.




Login.HTML




Now, second java servlet program...


UserLogin.java



"Start -> All Programs -> Apache Tomcat 4.0 -> Start Tomcat." and minimize window


How to Install Apache Tomcat 4.0 then Click Here

and for Download Apache Tomcat 4.0 then Click Here


Now compile the above both code using javac compiler...









Now, copy "UserLogin.class" File from c:/jdk1.4/bin/ and then paste it under below dir...



"C:/Program Files/Apache Tomcat 4.0/webapps/examples/WEB-INF/classes/"



or use below command






or you can use "*.class" for copy all classes...







Now Open any web browser and type client side URL into address bar as below...



User's Autentication Page





Error Page (If Password is wrong)


Final Welcome Page of School-Management-System


Complete Source Code of USER-AUTENTICATION PAGE With Database - Download





30 comments:

  1. Hi,
    I read your article, you’re describing of expression is excellent and the most valuable thing is, your attracting topic declaration. I really enjoyed and great effort.
    Thanks for sharing!

    ReplyDelete
  2. thanks for this informative tutorial.. I am really glad I have found this information
    Hello world in C programming

    ReplyDelete
  3. Thanks for sharing this tutorial.I would like to suggest
    java training in velachery for better tutorial and job assistance

    ReplyDelete
  4. Thank you for sharing such knowledgeable post its not only helpful for the old but also new student for better preparation. I just share your post with my friends so that they can also read your post. Training Institute on Advance Java.

    ReplyDelete
  5. It’s hard to come by experienced people about this subject, but you seem like you know what you’re talking about! Thanks
    Java Training Center in Bangalore

    ReplyDelete
  6. Very useful information provided. As a JAVA training institute ACL IT academy appreciate such blogs. Thanks and regards
    ACL IT academy- Java Training Institute in Kolkata

    ReplyDelete
  7. Very impressive article! The blog is highly informative and has answered all my questions. To introduce about our company and the activities, Pegasi Media Group is a database provider that helps you to boost your sales & grow your business through well-build Java user list

    ReplyDelete
  8. Awesome post. You Post is very informative. Thanks for Sharing.
    Core Java Course in Noida

    ReplyDelete
  9. Hi there I am so thrilled I found your website, I really found you by mistake, while I was browsing on Yahoo for something else, Anyhow I am here now and would just like to say thanks a lot for a tremendous post and an all-round exciting blog (I also love the theme/design), I don’t have time to go through it all at the minute but I have saved it and also added in your RSS feeds, so when I have time I will be back to read more, Please do keep up the awesome job.Surya Informatics

    ReplyDelete
  10. Best devops online training institute.they are giving complete core subject of devops.and i am very thankfull for this institute.

    ReplyDelete
  11. I'm too lazy to sign up an account just for comment your article. it's really good and helping dude. thanks!Java Training Institute in Delhi

    ReplyDelete
  12. It was a very good experience,Faculty members are very knowledgeable and cooperative. Specially My trainer teaching more as he focused upon practical rather than theory. All together it was an enlightening and informative course.

    advanced java training institutes in bangalore

    advanced java training in bangalore

    best advanced java training institutes in bangalore

    advanced java training course content

    advanced java training interview questions

    advanced java training & placement in bangalore

    advanced java training center in bangalore

    ReplyDelete
  13. Hi, thanks for this informative tutorial.. We are technology/news/smartphone company, If you want to read such useful news then Visit us: https://techmie.com/

    ReplyDelete
  14. It was a very good experience,Faculty members are very knowledgeable and cooperative. Specially My trainer teaching more as he focused upon practical rather than theory.
    Java Developer Jobs available in Chennai

    ReplyDelete
  15. It was so good seeing your website and your content is so accurately put which will be so useful for people to get some understanding quick, if such topics intrigue you you can check out data science course in bangalore

    ReplyDelete
  16. Great Post. Very informative. Keep Sharing!!

    Join Online Java Classes

    For more details about the course fee, duration, classes, certification, and placement call our expert at 70-70-90-50-90

    ReplyDelete