I created a customized login module and placed in the login-config.xml in jboss:
<application-policy name="CustomizedLogin">
- 
  <login-module code="com.xyz.net.CustomizedLoginModule" flag="required" /> 
  
  </application-policy>


here is the jboss-web.xml

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
        <security-domain>java:/jaas/CustomizedLogin></security-domain>
        
                
</jboss-web>


here is the web.xml part


<security-constraint>
                <web-resource-collection>
                        <web-resource-name>Login Test</web-resource-name>
                        <url-pattern>/*</url-pattern>
                </web-resource-collection>
                <auth-constraint>
                        <role-name>admin</role-name>
                </auth-constraint>
         </security-constraint>
         <login-config>
                <auth-method>FORM</auth-method>
                <realm-name>Test Application</realm-name>
          
                <form-login-config>
                <form-login-page>/login.html</form-login-page>
                 <form-error-page>/login.html?failed=true</form-error-page>
         </form-login-config>
         </login-config>
         <security-role>
                <role-name>admin</role-name>
         </security-role>   


here is the login.html

!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
"http://www.w3.org/TR/html4/loose.dtd";>


<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
 login test


<h2> Login</h2>
<FORM METHOD=POST ACTION="j_security_check">

  Enter user ID and password: 

 User ID 
 Password   


   And then click this button: 








did I do something wrong, do I need to specify the j
_security_check in the web.xml, thanks for ur help

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4099081#4099081

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4099081
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to