Executable war file that starts jetty without maven

后端 未结 9 551
野趣味
野趣味 2020-12-04 05:03

I\'m trying to make an \"executable\" war file (java -jar myWarFile.war) that will start up a Jetty webserver that hosts the webapp contained in the WAR file I

9条回答
  •  盖世英雄少女心
    2020-12-04 05:35

    I have done a similar thing before but are you launchign the app as "java -jar xxx.war" ?. You have only 2 jars and it is not going to be enough I think. Also try using Jetty 7.0.0M1 (which is the latest version). When I added jetty-server and jetty-webapp as two dependencies (they are from org.eclipse.jetty) I get the following jar's in the lib directory. FYI the org.mortbay.jetty.Handler was in the jetty-server*.jar.

    • jetty-continuation-7.0.0.M1.jar
    • jetty-http-7.0.0.M1.jar
    • jetty-io-7.0.0.M1.jar
    • jetty-security-7.0.0.M1.jar
    • jetty-server-7.0.0.M1.jar
    • jetty-servlet-7.0.0.M1.jar
    • jetty-util-7.0.0.M1.jar
    • jetty-webapp-7.0.0.M1.jar
    • jetty-xml-7.0.0.M1.jar

提交回复
热议问题