Hi you surely miss:
<security-role> <role-name>TutorialUser</role-name> </security-role> Romain Manni-Bucau @rmannibucau http://www.tomitribe.com http://rmannibucau.wordpress.com https://github.com/rmannibucau 2015-02-21 6:09 GMT+01:00 davshowhan <davshowhan...@gmail.com>: > > web.xml file > > <security-constraint> > <display-name>Constraint1</display-name> > <web-resource-collection> > <web-resource-name>wrcoll</web-resource-name> > <description/> > <url-pattern>/*</url-pattern> > </web-resource-collection> > <auth-constraint> > <description/> > <role-name>TutorialUser</role-name> > </auth-constraint> > </security-constraint> > <login-config> > <auth-method>FORM</auth-method> > <realm-name>file</realm-name> > <form-login-config> > <form-login-page>/login.html</form-login-page> > <form-error-page>/error.html</form-error-page> > </form-login-config> > </login-config> > > > > > server.xml: > > <Realm className="org.apache.catalina.realm.MemoryRealm" /> > > > > > tomcat-users.xml > > <role rolename="TutorialUser"/> > <user username="dave" password="password" roles="TutorialUser"/> > > > > form: > > <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"/> > > > > <p></p> > <input type="submit" value="Submit"/> > > <input type="reset" value="Reset"/> > </form> > > > > > I cant get in even if I typed the correct username and password. I have > researched a lot and it seems I have dont need anything else to do to make > it work, but it still doesnt work. Can anyone help? > > > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Cannot-get-form-authentication-to-work-in-TOMEE-tp4673840.html > Sent from the TomEE Dev mailing list archive at Nabble.com.