Reputation: 1021
I just started learning java, and have not worked with java ee. I need to authenticate users using servlets. Advise, please, sample code and technical literature. Thank you!
Upvotes: 2
Views: 2502
Reputation: 240948
create a html form that accept username / password.
post these data to a servlet.
in doPost() read these data from request
check them against database.
set some parameter in session
that will show your system that this user is authenticated and logged in.
Also See
Upvotes: 3
Reputation: 39907
Very simple Servlet/JSP related code to get you started. And here is a fine example of Form Based Authentication Using Servlet.
Upvotes: 3