I want to pull in an xml file, however I seem to be having difficulty with the relative path. The file is on the root of src and is therefore replicated into the root of classes, however this fails indicating the file reference is invalid.
I am within a war (within an ear) however I am not in a servlet so I cannot take advantage of servletContext.
The following code fails indicating file not found. Any suggestions?
Yes thats true as well. Also "WEB-INF/classes/" is in the classpath so keeping "SearchCriteria.xml" file in there will make it easier.
posted 8 years ago
Thank you for your recommendations. This works great. I had originally placed the file in \classes because there are some other related files at the root of \src and hence are copied to \classes. Your comments are right on and I will move my file to \WEB-INF.
I really appreciate the help.
Back in the saddle,
Power corrupts. Absolute power xxxxxxxxxxxxxxxx is kinda neat.
Create Edit Print & Convert PDF Using Free API with Java