Hello,
On 5/30/24 10:12, firstName lastName wrote:
Renaming my context.xml to ROOT.xml (without changing the folder) fixed the
problem. Thanks for the help!
The best practice would be to put your context.xml file into your WAR
file's META-INF/context.xml path. That way, it will be deployed from the
WAR file and you don't have to keep a separate file around.
If you need to override the contents of the WAR-packaged file, then you
will need to use conf/[Engine]/[Host]/[App].xml
https://tomcat.apache.org/tomcat-10.1-doc/config/context.html#Defining_a_context
-chris
On Thu, May 30, 2024 at 8:42 AM David Rush <david.r...@wyo.gov> wrote:
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.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org