On 23/07/2010 15:33, martin.szna...@centrum.cz wrote:
> 
> Hello
> In Tomcat 6 I was using this code to get StandardContext:
>         StandardEngine engine = (StandardEngine) 
> ServerFactory.getServer().findService("Catalina").getContainer();
>         StandardContext context = (StandardContext) 
> engine.findChild(engine.getDefaultHost()).findChild(getPortalContext());
> 
> but this is no more working in Tomcat 7, because ServerFactory was removed.
> 
> My code was inspired by this HowTo:
> http://wiki.apache.org/tomcat/HowTo#How_do_I_get_direct_access_to_a_Tomcat_Realm.3F
> 
> Does anyone have idea how to get StandardContext instance in Tomcat 7?

You should be able to go via the MBean server.

Mark



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to