Hi. In this case, you can use the security options of your container (
Tomcat,
JBoss, etc). You can use Tomcat with
JDBC Realm. The login page need to have an input named "j_username", other input named "j_password" and the action of the form "j_security_check". There is an excelent example about it in the book Head First - Servlets and
JSP.
References:
Tomcat Realms