• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 567
  • Last Modified:

Login System for a web application


Hi,
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
0
bhession
Asked:
bhession
  • 3
  • 2
1 Solution
 
javaexpertoCommented:
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
0
 
bhessionAuthor Commented:
Hmmmm yes, examples on how to do this would be brilliant if you have them. Thanks.
0
 
bhessionAuthor Commented:
Could I get some examples? Thanks
0
 
javaexpertoCommented:
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

MyServletSession.zip
0
 
bhessionAuthor Commented:
Apologies, I didnt realise I hadnt closed this off. Just what I needed.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now