IllegalArgumentException:javax.security.jacc.PolicyContext.getContext中的未知处理程序密钥

时间:2016-05-16 06:19:45

标签: java tomcat6 java-security

我正在使用Tomcat 6.0.44。我得到例外:

  

javax.security.auth.login.LoginException:   java.lang.IllegalArgumentException:未知的处理程序密钥   javax.security.jacc.PolicyContext.getContext(PolicyContext.java:311)

在下面的代码行:

HttpServletRequest request = (HttpServletRequest) PolicyContext.getContext("javax.servlet.http.HttpServletRequest");

我提到依赖的POM文件是:

        <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <version>3.0.1</version>
      <scope>provided</scope>
       </dependency>

  <dependency>
        <groupId>javax.security.jacc</groupId>
        <artifactId>javax.security.jacc-api</artifactId>
        <version>1.4</version>
 </dependency>

0 个答案:

没有答案