title: REST: run main method from a jar located inside "/web-inf/lib" of a web project
body: <p>I'm using Jersey 1.x and Tomcat 8.0. I have a .jar file which is my main application that I've uploaded to "/web-inf/lib" of a Dynamic Web Project.</p>
  
  <p>I can't seem to figure out how to run a class which contains a main method inside this jar, which is crucial for my web service because It creates a connection to the Derby DB and all my web service methods are using these connections.</p>
  
  <p>It has to start running when Tomcat server starts.</p>