0

我正在使用 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>
4

0 回答 0