Login System for a web application

Posted on 2009-04-17
Last Modified: 2013-11-24

I am developing a web application using ecipse IDE and tomcat, and I want to create a login system for it any one know how I might be able to do this, or where I might get examples on how to do the same. The simpler the better.
I was thinking of using a html form to enter in a username and password, Maybe using a database to store my authorised username and password. Any Ideas
Question by:bhession
    LVL 6

    Expert Comment

    There are many approaches to do this, I  think if you are begginer the easiest way is to make a html form with these fields (user and password) and then call a Java Servlet with these parameters. With the Java Servlet create a connection to your database, and finally with the servlet redirect the initial page or again the login page if user or password are wrong.
    Let me know if you want some example.
    Good luck

    Author Comment

    Hmmmm yes, examples on how to do this would be brilliant if you have them. Thanks.

    Author Comment

    Could I get some examples? Thanks
    LVL 6

    Accepted Solution

    Hello sorry for being late, here you have a basic example with a servlet, In this servlet I don't check to any database, but I hope u can do it, I give u the html form, the servlet, and the jsp. As you know servlets need an xml descriptor, here u have too.

    Please save the files as correspond: html, xml, java and jsp

    If u don't understand anything please tell me I'll try to response fast this time.

    Good luck

    Author Comment

    Apologies, I didnt realise I hadnt closed this off. Just what I needed.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    Introduction (All good things must come to an end ( The original MySQL API ( has gone away, deprecated by PHP in Version 5.5, and removed from PHP in all curre…
    Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
    Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now