L
liumingabc
Unregistered / Unconfirmed
GUEST, unregistred user!
&lt;application-policy name = &quot;ynnssb&quot;&gt;以及表单认证和这的关系原理是什么? ( 积分: 50 )<br /> &lt;application-policy name = "ynnssb"&gt;
&lt;authen
tication&gt;
&lt;login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag = "required"&gt;
&lt;module-option name="dsJndiName"&gt;java:/electax&lt;/module-option&gt;
&lt;module-option name="principalsQuery"&gt;select Password from dj_nsrmm where rtrim(nsrsbh)=? and isvalid='1'&lt;/module-option&gt;
&lt;module-option name="rolesQuery"&gt;select 'USERS' as Role, 'Roles' as RoleGroup from dj_nsrmm where rtrim(nsrsbh)=?&lt;/module-option&gt;
&lt;/login-module&gt;
&lt;/authen
tication&gt;
&lt;/application-policy&gt;
以下表单认证
&lt;form method="POST"
action="j_security_check"
name=form1&gt;
&lt;TR&gt;
&lt;TD class=TopLighNav2 height=30 align=center&gt;
用户名:&lt;input type="text"
name="j_username"
onkeydown="setFocus()"&gt;
&lt;br&gt;
密&nbsp;&nbsp;码:&lt;input type="password"
name="j_password"
onkeydown="setFocus()"&gt;
&lt;br&gt;&lt;br&gt;
&lt;input type="submit"
name="login"
value="
确 定 "
class="buttonx3"&gt;
&nbsp;&nbsp;&nbsp;&nbsp;
&lt;input type="button"
name="login"
value="
退 出 "
onclick="closeme()"
class="buttonx3"&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/form&gt;
&lt;authen
tication&gt;
&lt;login-module code = "org.jboss.security.auth.spi.DatabaseServerLoginModule"
flag = "required"&gt;
&lt;module-option name="dsJndiName"&gt;java:/electax&lt;/module-option&gt;
&lt;module-option name="principalsQuery"&gt;select Password from dj_nsrmm where rtrim(nsrsbh)=? and isvalid='1'&lt;/module-option&gt;
&lt;module-option name="rolesQuery"&gt;select 'USERS' as Role, 'Roles' as RoleGroup from dj_nsrmm where rtrim(nsrsbh)=?&lt;/module-option&gt;
&lt;/login-module&gt;
&lt;/authen
tication&gt;
&lt;/application-policy&gt;
以下表单认证
&lt;form method="POST"
action="j_security_check"
name=form1&gt;
&lt;TR&gt;
&lt;TD class=TopLighNav2 height=30 align=center&gt;
用户名:&lt;input type="text"
name="j_username"
onkeydown="setFocus()"&gt;
&lt;br&gt;
密&nbsp;&nbsp;码:&lt;input type="password"
name="j_password"
onkeydown="setFocus()"&gt;
&lt;br&gt;&lt;br&gt;
&lt;input type="submit"
name="login"
value="
确 定 "
class="buttonx3"&gt;
&nbsp;&nbsp;&nbsp;&nbsp;
&lt;input type="button"
name="login"
value="
退 出 "
onclick="closeme()"
class="buttonx3"&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/form&gt;