Reputation: 186
I'm porting a app that ran in tomcat to Jboss where it will be deployed as a .WAR file. I have a line of code that looks for a configuration .xml file :
appContext = new ClassPathXmlApplicationContext("cmdAppContext.xml");
Now I tried putting it in WEB-INF/classes (After comparing with eclipse generated .WAR file), and also tried the WEB-INF folder as it was referred in that location in the web.xml. However each time I get a NullPointerException. Am I missing anything here?
Please note: I've already seen the similar question in forums which was not resolved
Upvotes: 0
Views: 875
Reputation: 50
It's not a good idea to look into context.xml
from source code. You should use a .properties
file to configure your app. .WAR is like a .ZIP file with all sites files inside, so META-INF
are inside at root folder from .WAR.
Upvotes: 1