I've done my form as yours, but the users are not authenticated, even my
loginError.jsp is called. Should I import some package from login.jsp or
loginError.jsp? See my configurations:
web.xml:
<security-constraint>
<web-resource-collection>
<web-resource-name>Secure Pages</web-resource-name>
<url-pattern>/cadastro/web/ConsultaAluno.jsp</url-pattern>
<http-method>GET</http-method>
<http-method>POST</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>professor</role-name>
</auth-constraint>
<user-data-constraint>
<transport-guarantee>NONE</transport-guarantee>
</user-data-constraint>
</security-constraint>
<security-role>
Grupo dos professores
<role-name>professor</role-name>
</security-role>
<login-config>
<auth-method>FORM</auth-method>
<!-- ExampleRealm is defined in login-config.xml -->
<realm-name>testeSec</realm-name>
<form-login-config>
<form-login-page>/login.jsp</form-login-page>
<form-error-page>/loginError.jsp</form-error-page>
</form-login-config>
</login-config>
login-config.xml:
<application-policy name = "jmx-console">
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule"
flag = "required" />
</application-policy>
<application-policy name = "testeSec">
<login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag = "required">
<module-option
name="dsJndiName">java:/AcademicoDB</module-option>
<module-option
name="principalsQuery">select passwd from users where username=?</module-option>
<module-option
name="rolesQuery">select userRoles, roleGroup from userroles where
username=?</module-option>
</login-module>
</application-policy>
<a
href="http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3825371#3825371">View
the original post</a>
<a
href="http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3825371>Reply
to the post</a>
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user