I have an application named "lab-4-eureka-server" which I have made a war file for. I am deploying this application into my standalone tomcat. When I deploy the app, since no spring.profiles.active is specified, the webapp starts with the default default. After reading online, I found that I could pass specific parameters to my webapp if I created a context.xml in the base/conf/Catalina/localhost folder. I have created a "lab-4-eureka-server.xml" inside the localhost folder with the following contents (which is just a shot in the dark to show what I'm trying to do).
<?xml version="1.0" encoding="UTF-8"?>
<!-- Context configuration file for my web application -->
<Context>
<Resource name="profile" type="spring.profiles.active" value="primary" />
</Context>
I can see that when tomcat deploys my webapp, it is attempting to use this file with the below exception:
What should my context.xml say in order to load the profile? I've read that I could edit some catalina.sh, or other files, but (from my understanding), those configurations will send the same java arguments to all deployed webapps. I'm going to the context.xml route because I plan to send different java arguments to different webapps
(note: I do know that spring boot could start it's own tomcat server. I will have mutiple webapps deployed into 1 tomcat server, so that is why I need this)