String uname = request.getParameter("username");
String pword = request.getParameter("password");
try {
request.login(uname, pword);
request.authenticate(response);
} catch(ServletException se) {
request.setAttribute("authenticationMessage", "Login failed.");
Logger.getLogger(actions.LoginAction.class.getName()).log(Level.INFO, "Login Failed for User ID: "+uname);
return("fail");
}