2011-09-27 56 views
1

我将一个遗留应用程序从JBoss 4.2.3移植到JBoss 7(Web配置文件版本)。他们使用自定义登录模块并使用阀门将登录失败原因捕获到j_exception中。他们通过把context.xml的投入战争的WEB-INF目录,其内容如下:JBoss 7中的ExtendedFormAuthenticator

<!-- Add the ExtendedFormAuthenticator to get access to the username/password/exception -> 
<Context cookies="true" crossContext="true"> 
<Valve className="org.jboss.web.tomcat.security.ExtendedFormAuthenticator" 
     includePassword="true" ></Valve> 
</Context> 

登录为我工作,但不是说阀。当有登录例外时,j_exception仍然是空的,而依赖于分析登录被拒绝原因的逻辑失败。根据这个链接:http://community.jboss.org/wiki/ExtendedFormAuthenticator,一切都看起来不错。然而,这种联系是非常古老的,从那时起事情就有可能发生变化。新方法是什么?

回答

0

看来,安全阀门现在的jboss-web.xml中直接定义,像这样:

<jboss-web> 
<security-domain>mydomain</security-domain> 
<valve> 
     <class-name>org.jboss.web.tomcat.security.ExtendedFormAuthenticator</class-name> 
     <param> 
      <param-name>includePassword</param-name> 
      <param-value>true</param-value> 
     </param> 
    </valve> 
</jboss-web> 

然而,ExtendedFormAuthenticator类没有移植到JBoss 7.0.1。一张票已经打开了,所以它应该出现在JBoss 7.1.0中: https://issues.jboss.org/browse/AS7-1963