I am trying to secure a page by allowing only authenticated viewing. But when i apply <security-constraint> in my app's web.xml file...i could not open any file...not even index.html . It shows 404 "not found error". However app runs fine without security constraint but without authentication!
My web.xml file looks like...
<security-constraint>
<web-resource-collection>
<web-resource-name>EmployeeSpecific</web-resource-name>
<url-pattern>/employee/loginTarget.html</url-pattern>
<http-method>POST</http-method>
<http-method>GET</http-method>
</web-resource-collection>
<auth-contstraint>
<role-name>employee</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>empLogin.html</form-login-page>
<form-error-page>loginError.html</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>employee</role-name>
</security-role>
My app directory is like...
tomcat > webapps > ash > WEB-INF > web.xml
ash > index.html
ash > empLogin.html
ash > employee > loginTarget.html