简体   繁体   English

从JBOSS 7.1.1升级到Wildfly 8.2.1的问题

[英]Issue with upgrading from JBOSS 7.1.1 to Wildfly 8.2.1

In my project previously we were using jboss 7 as the application server and my application was having a code like below in the jboss-web.xml. 在我的项目中,以前我们使用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>

and it was working fine. 而且工作正常。 But currently we upgraded to wildfly 8.2.1 and the valve is not getting called for any request.The valve is used for custom authentication. 但是目前我们已升级到Wildfly 8.2.1,并且没有收到任何请求调用该阀门。该阀门用于自定义身份验证。 The valve code is like below. 阀门代码如下。

package com.session; 包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  
    }

}

Please help me with the issue. 请帮我解决这个问题。

You have to configure the valve in standalone.xml file under web subsystem. 您必须在Web子系统下的standalone.xml文件中配置阀门。 as below 如下

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM