On Monday, July 29, 2002, at 05:51 , Craig R. McClanahan wrote:
> On Mon, 29 Jul 2002, Tim McLaughlin wrote: > >> The Question: >> How do I specify a class other than >> org.catalina.authenticator.BasicAuthenticator to handle Basic >> authentication? > > There is a properties file in the org.apache.catalina.authenticator > package that defines the mapping of authentication method to classname. > You would need to customize this file in > $CATALINA_HOME/server/lib/catalina.jar. > > Or, an easier approach would be to copy your customized version of this > file into the > $CATALINA_HOME/server/classes/org/apache/catalina/authenticator > directory > (which you'd have to create). This works because the Catalina class > loaders load from the "classes" directory before they load from > JAR files > in the corresponding "lib" directory -- this works both for the server > class loader (server/classes before server/lib), the common class > loader > (common/classes before common/lib) and the webapp class loader > (WEB-INF/classes before WEB-INF/lib). The only properties file I found in src/share/org/apache/catalina/authenticator directory was for the LocalStrings translations. However, the package.html file mentioned the src/share/org/apache/catalina/startup/Authenticators.properties file. I have created a copy in $CATALINA_HOME/server/webapps/pc- manager/WEB- INF/classes/org/apache/catalina/startup/Authenticator.properties and specified my custom class, PerContextBasicAuthenticator for BASIC. I then restarted tomcat, but the log shows that it is not using my class (debug=3), instead using the default class. So I moved the new file to $CATALINA_HOME/server/classes/org/apache/catalina/startup/Authenticator.properties and then it works. When I specify a class to handle BASIC authentication, do I have to do it server-wide, or can I do it on a per-context basis? Thanks, Tim -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
