Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在 Tomcat 6 中,RealmBase 提供了一个“路径”字段。这显然已在 Tomcat 7 中删除。我需要知道如何在我的 authenticate() 方法中确定上下文根的值。
我通过查看 RealmBase 的 6.0 源代码找到了一种方法。
幸运的是,RealmBase 派生的实例有一个包含上下文根路径的“上下文”属性:
this.getObjectName().getKeyProperty("context");