I tried this example of an embedding war into a jetty. When I debug on eclipse everything its ok and the webservices is deployed fine in port 8080, but when I make a jar with this program and put into a serv开发者_Python百科er (I tried into a tomcat 5.5 and into a jetty 7.4.1) when I start the program, when I started the jetty server appears this exception:
7641 [qtp21021313-35] ERROR configuration.EngineConfigurationFactoryServlet - Unable to find config file. Creating new servlet engine config file: /WEB-INF/server-config.wsdd
7641 [qtp21021313-35] WARN configuration.EngineConfigurationFactoryServlet - Unable to load/create servlet engine config file, attempting internal default (from jar).
Only the default webservices methos are deployed (AdminService and Version) The wsdd its fine. If I deploy this war into a server it works perfectly
You should run the java code without the servlet container (Tomcat/Jetty), you have the jetty server embedded, that's why in eclipse the code works fine.
Jetty's slogan: "Don't deploy your application in Jetty, deploy Jetty in your application."
You should check this tutorial: http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty
For more info: http://wiki.eclipse.org/Jetty/Howto/Deploy_Web_Applications
精彩评论