Domanda

In Tomcat 6, RealmBase provided a "path" field. That apparently has been removed in Tomcat 7. I need to know how to determine the value of the context root inside my authenticate() method.

È stato utile?

Soluzione

I found a way to get this by looking at the 6.0 source code of RealmBase.

Fortunately the RealmBase-derived instance has a "context" property containing the context root path:

this.getObjectName().getKeyProperty("context");
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top