No I have it working on webprofile:
src/main/webapp/error.html <html> <body> <h1>Error</h1> </body> </html> src/main/webapp/index.html <html> <body> You did it! You are logged! </body> </html> src/main/webapp/login.html <html> <body> <form method="post" action="j_security_check"> Please type your user name: <input type="text" name="j_username" size="20"/> Please type your password: <input type="password" name="j_password" size="20"/> <br /> <input type="submit" value="Submit"/> <input type="reset" value="Reset"/> </form> </body> </html> src/main/webapp/WEB-INF/web.xml <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1"> <security-constraint> <web-resource-collection> <web-resource-name>sudo-security</web-resource-name> <url-pattern>/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>sudo</role-name> </auth-constraint> </security-constraint> <security-role> <role-name>sudo</role-name> </security-role> <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/login.html</form-login-page> <form-error-page>/error.html</form-error-page> </form-login-config> </login-config> </web-app> Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2015-02-21 9:27 GMT+01:00 davshowhan <davshowhan...@gmail.com>: > > I tried and the error still persists. Is it because I am running it in ther > web profile again? should be using web plus? > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Cannot-get-form-authentication-to-work-in-TOMEE-tp4673840p4673842.html > Sent from the TomEE Dev mailing list archive at Nabble.com.