Hi,
I am trying to use the Form Authentication to enable security.
its works fine with the default netweaver login page. But i want to have a custom login page and as such am using the <form-login-page> to redirect to the login page
http://docs.oracle.com/javaee/5/tutorial/doc/bncbx.html#bncby
But even then it redirects to the default login page
any suggestion on how to achieve this?
web.xml
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"><display-name>hello1_formauth</display-name> <servlet> <display-name>index</display-name> <servlet-name>index</servlet-name> <jsp-file>/index.jsp</jsp-file> </servlet> <security-constraint> <display-name>SecurityConstraint</display-name> <web-resource-collection> <web-resource-name>WRCollection</web-resource-name> <url-pattern>/pages/*</url-pattern> <url-pattern>/pages/mainindex.html</url-pattern> </web-resource-collection> <auth-constraint> <role-name>loginUser</role-name> </auth-constraint> <user-data-constraint> <transport-guarantee>NONE</transport-guarantee> </user-data-constraint> </security-constraint> <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/login.html</form-login-page> <form-error-page>/logonError.jsp</form-error-page> </form-login-config> </login-config> <security-role> <role-name>loginUser</role-name> </security-role> </web-app>
the login.html file is directly under the webcontent folder. All other files are in a folder called pages which is under the webcontent.