I don't know about any docker-related differences, but.... I think that if you put a context config file under Catalina/localhost you need to name the .xml file the same as your .war file. So if you have foo.war, then you'd have Catalina/localhost/foo.xml
You can also put a file named context.xml into the .war file itself, under META-INF directory. David On Thu, May 30, 2024 at 7:35 AM firstName lastName <nouser3333...@gmail.com> wrote: > I am trying to setup JNDI for tomcat with a java webapp. I am using the > official tomcat docker image (version 10.1.24-jdk21-temurin-jammy). > However, I'm a bit confused about where to put the context.xml file. I > tried putting it in /usr/local/tomcat/conf/Catalina/localhost/context.xml > but tomcat refuses to start with the error "The main resource set specified > [/usr/local/tomcat/webapps/context] is not a directory or war file, or is > not readable'. I put my war file in /usr/local/tomcat/webapps/ROOT.war > > Are these paths correct or should I have put the context.xml or war file in > a different directory? My hosting provider does not want me to edit the > server.xml file (I have found google articles suggesting defining the JNDI > <Resource> tag in the server.xml and then using a <ResourceLink> in the > context.xml, but my hosting provider wants me to define the <Resource> tag > in the context.xml file instead of the server.xml file). > > Thanks for your help! > -- E-Mail to and from me, in connection with the transaction of public business, is subject to the Wyoming Public Records Act and may be disclosed to third parties.