0

I have a 3rd party jar package that uses a config file (XML). If this package is used in a desktop application, the XML has to be placed in same folder where the application jar is present.

Now I am using the same jar package in a web application using servlet and jsp pages. I am not sure where to put the XML file. The web application is unable to look for this XML and shows error "Unable to find config file" (error from jar API).

Already tried placing the XML file in WEB-INF/Classes, /lib folders.

The XML contains the following code-

<Configuration>
    <!-- Address -->
    <Address value="https:xxxxxxxxxxxxxxxxxxxxx" />
</Configuration>
Ahmed Ashour
  • 5,179
  • 10
  • 35
  • 56
Ashish
  • 1
  • 1

2 Answers2

0

Add the jar file to your WEB-INF/lib folder. Right-click your project in Eclipse, and go to "Build Path > Configure Build Path" Add the "Web App Libraries" library

This will ensure all WEB-INF/lib jars are included on the classpath.

reference: How can I add JAR files to the web-inf/lib folder in Eclipse?

Community
  • 1
  • 1
Elias
  • 664
  • 2
  • 11
  • 23
0

Just copy paste all your jars here:enter image description here

Another way is right click on your project-> configure build path->add external jarsenter image description here

Akshay
  • 1,161
  • 1
  • 12
  • 33