【问题标题】:Issue with upgrading from JBOSS 7.1.1 to Wildfly 8.2.1从 JBOSS 7.1.1 升级到 Wildfly 8.2.1 的问题
【发布时间】:2015-11-27 13:05:15
【问题描述】:

在我之前的项目中,我们使用 jboss 7 作为应用程序服务器,而我的应用程序在 jboss-web.xml 中有如下代码。

<jboss-web>
  <security-domain>my-form-auth</security-domain>
  <context-root>webapps</context-root>
  <valve>
    <class-name>com.session.MyAuthenticaor</class-name>
 </valve>
</jboss-web>

它工作正常。但是目前我们升级到wildfly 8.2.1并且阀门没有被任何请求调用。阀门用于自定义身份验证。阀门代码如下。

包 com.session;

import java.io.IOException;

import org.apache.catalina.authenticator.FormAuthenticator;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.deploy.LoginConfig;

public class MyAuthenticaor extends FormAuthenticator{

    public boolean authenticate(Request request, Response response,LoginConfig config) throws IOException {
        //code for authentication  
    }

}

请帮我解决这个问题。

【问题讨论】:

    标签: java jboss wildfly-8


    【解决方案1】:

    您必须在 web 子系统下的standalone.xml 文件中配置阀门。如下

    <valve name="<valve name>" module="<your valve module name>" class-name="com.session.MyAuthenticaor"></valve>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-11-06
      • 1970-01-01
      • 2019-10-24
      • 2017-01-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-03-16
      相关资源
      最近更新 更多