I have an existing app, that runs in tomcat. Now I am evaluating dropwizard for my new rest webservices. Now, dropwizard comes with inbuilt jetty. How do I deploy it with my tomcat container and not with its jetty container?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can't do this. Dropwizard embeds Jetty. You should look into just using Jersey as a standard web application.
回答2:
It makes a lot of sense to roll out your application as a jar, but sometimes you are bounded by company/enterprise standards and you're obliged to deploy on a given application server in production. 'Dropwizard in a box' ( https://github.com/rvs-fluid-it/wizard-in-a-box) makes it trivial to deploy a Dropwizard application as a war. It swaps DropWizard's embedded Jetty container and bridges to a servlet 3 container. 'Dropwizard in a box' is tested on Tomcat 7 and Weblogic 12c.