You can do a check at the login page. First get the username and password by request.getParameter("username") and ("password"), if this two objects are null(
String usually), then present the login prompt for user to fill in the username and password. If username and password are not null, check if they are correct. If correct, you can forward the page using <jsp:forward page="your.html">, if incorrect, present login page again. Hope this help.