On 23/03/2021 10:05, Ravi Kumar wrote:
Hello, I am migrating my application which is using tomcat 7 currently to tomcat 9. As there are a lot of changes in the API, with tomcat 7 we were setting the Realm for this engine by // set the Realm for this engine //tomcatServer.setDefaultRealm(new TomcatRepoRealm()); Here tomcatServer is an object of org.apache.catalina.startup.Tomcat.Tomcat() and we are invoking the setDefaultRealm to set the realm for the engine for our application running on Tomcat 7.Now as we are migrating our application from Tomcat 7 to Tomcat 9, if we try to set the realm for the engine then what is the best way to do that as org.apache.catalina.startup.Tomcat.Tomcat().setDefaultRealm() is now deprecated.Appreciate your help!
tomcatServer.getEngine().setRealm(new TomcatRepoRealm()); Mark --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org