作者:33今夜无眠44 | 来源:互联网 | 2023-05-17 09:52
WhenusingJAASJDBCRealmswithTomcat,Iusuallydefinetherealminserver.xml.ButnowIamlooki
When using JAAS JDBCRealms with Tomcat, I usually define the realm in server.xml
. But now I am looking for a simpler solution, where I don't have to configure the Tomcat container when deploying the application.
将JAAS JDBCRealms与Tomcat一起使用时,我通常在server.xml中定义域。但是现在我正在寻找一个更简单的解决方案,在部署应用程序时我不必配置Tomcat容器。
If possible, I would like to keep all the JAAS configuration in web.xml and just define the realm per application/webapp.
如果可能的话,我想在web.xml中保留所有JAAS配置,并且只为每个应用程序/ webapp定义领域。
One thread mentions that he did this by defining the realm in META-INF/context.xml
of the webapp.. but I could not get it working (Why is Tomcat manager using my LoginModule?).
一个帖子提到他通过在webapp的META-INF / context.xml中定义领域来做到这一点..但是我无法使它工作(为什么Tomcat管理器使用我的LoginModule?)。
Please help me find the correct location in the .war to define a org.apache.catalina.realm.JDBCRealm
that is then used for that webapp.
请帮助我在.war中找到正确的位置来定义org.apache.catalina.realm.JDBCRealm,然后将其用于该webapp。
1 个解决方案