为什么tomcat7在JAAS中找不到LoginModule类 [英] Why is tomcat7 unable to find LoginModule class in JAAS

查看:41
本文介绍了为什么tomcat7在JAAS中找不到LoginModule类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个打包在 WAR 中的应用程序,它在现有的 Tomcat6 服务器上运行良好.

I have an application packaged in a WAR which is running great on an existing Tomcat6 server.

我现在正在尝试在 tomcat7 中部署它,但是一旦我运行登录操作,就会收到以下错误:登录失败.原因:LoginException:无法找到 LoginModule 类:security.jass.SimpleLoginModule

I am now trying to deploy it in tomcat7 but am getting the following error as soon as I run the login action: Failed login. Reason: LoginException: unable to find LoginModule class: security.jass.SimpleLoginModule

我在 conf 文件中有以下内容,该文件在 Java 的 security.properties 中定义:

I have the contents below in the conf file, which is defined in Java's security.properties:

UserLoginImpo
{
security.jass.SimpleLoginModule required;
};

在这里修改类名(改错)会使tomcat说找不到那个类名,从而消除conf文件没有被拾取"的原因.

Changing the class name here (to a wrong one) will make tomcat say it can't find that one, which eliminates the cause "the conf file isn't being picked up".

该类应该在类路径中:它在 WAR 的 lib 文件夹中的一个 jar 中.

The class should be in the classpath: it's inside a jar in the lib folder of the WAR.

我会遗漏什么?

推荐答案

正如@Jim 指出的,包名不正确:security.jaas,而不是 security.jass.

As @Jim pointed out, the package name was not correct: security.jaas, not security.jass.

证明你确实需要注意细节.

Goes to prove you really need to pay attention to details.

这篇关于为什么tomcat7在JAAS中找不到LoginModule类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆