Hello Everyone!
(1) Guys, I'm studying Servlets/JSP using famous HeadFirst book and now in the chapter about Authentication. The problem is that I cannot login to my web app when I am trying to do this via FORM authentication method. I CAN login when I am using BASIC method. What should I do? I am working via Netbeans, my tomcat 6.0.20 was supplied with it.
Login page is ok:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<form method="POST" action="j_security_check">
<input type="text" name="j_username">
<input type="password" name=j_password">
<input type="submit" value="Enter">
</form>
</body>
</html>{code}
tomcat-users.xml also:
{code}<tomcat-users>
<role rolename="Admin"/>
<role rolename="Member"/>
<role rolename="Guest"/>
<user username="Annie" password="admin" roles="Admin, Member, Guest" />
<user username="Diane" password="coder" roles="Member, Guest" />
<user username="Ted" password="newbie" roles="Guest" />
</tomcat-users>{code}
(2) Probably the problem is in Netbeans.
Thats why also I am trying to use the second way: deploying my application manually. I have started the server without Netbeans, and copied my build folder from my documents to webapps. Now I can open every html form in my application, but it looks like tomcat is not using my web.xml file. It is set properly: in the webapps/myapp/WEB-INF. What should I do after coping my build files to server webapp folder to deploy my application manually? At the moment my web.xml is out of the game.