I have a java application packaged into App.jar which has App.java class when ran as Java application starts the jetty server and exposes REST services, now I want the Jar to be embedded in to a WAR project with and when the WAR is deployed in to tomcat I want that App.java to run and bring up the rest services.
I don't want to have the same config in the WAR and don't want to have App.java in WAR again, I should be able to bring up the jetty server when WAR deployed in tomcat (Jetty runs on a different port other than what tomcat runs.)
Any help is appreciated.
Thanks