Trying to determine relative path location between Java and Tomcat

32 Views Asked by At

I have some old code that I am trying to stand back up. When I deploy the code it errors out saying: nested exception is javax.naming.NameNotFoundException: Name [twiddyApiConfigPath] is not bound in this Context. Unable to find [twiddyA piConfigPath].

The code is as follows:

String configPath = (String) new InitialContext().lookup("java:comp/env/twiddyApiConfigPath");

My question, is this looking for an environmental variable named twiddyApiConfigPath to load the file from?

Update:

So it sounds like it's a relative path. I still don't understand where I need to place the prop file in order to make it reachable by the application within the tomcat hierarchy.

0

There are 0 best solutions below