tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhiyong Liu <>
Subject Cannot load customized valve and realm from META-INF/context.xml
Date Tue, 19 Jun 2007 21:32:46 GMT
I am using Tomcat 5.0.28 and trying to get my customized valve and realm 
work but no luck with the following steps.
(1) put the jar file containing MyRealm.class and MyValve.class into 
(2) created a context.xml file in webapps/myapp/META-INF with the 
following content
     <?xml version="1.0" encoding="utf-8" ?>
           <Valve className="com.mycompany.myapp.MyValve" />
           <Realm className="com.mycompany.myapp.MyRealm" />
(3)Then I restarted Tomcat and debugged it but only found MyValve and 
MyRealm were not called at all.

I tried to move the context.html to conf/Catalina/localhost and the jar 
file to server/lib then everything went well. But this is not what I 
want since the customized Realm and Valve are specific to my application.

I am new to Tomcat and start to get frustrated with this. I thought it 
should be easy but after googled a lot I still cannot figure out a 
solution. Any tip will be highly appreciated


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message