开发者

Standard way of using Maven for Online Development

开发者 https://www.devze.com 2023-02-16 21:10 出处:网络
I\'ve recently started learning about Maven and my question is about standard ways for deploying my web application on a web/app-server.

I've recently started learning about Maven and my question is about standard ways for deploying my web application on a web/app-server.

I am able to create war file for a simple web ap开发者_开发技巧plication that uses spring and mysql. I would like to deploy the same on server and test the application. I could see some documents/articles that mention about Jetty for application deployment. I also saw some documentation that talks about Tomcat for application deployment.

I would like to know, which server normally is used while developing application with Maven?


Both Tomcat and Jetty have multiple ways allowing developers to deploy applications on them. And although I haven't used this myself, many people have recommended Cargo which, as you can see, supports not only Jetty/Tomcat but many other web containers (and not only via Maven).

Above said, you should probably choose server based on other criteria (features / speed / RAM consumption / community / other things mentioned by krosenvold). People have already discussed that here before:

  • Tomcat VS Jetty
  • https://stackoverflow.com/questions/4577095/jetty-or-tomcat
  • Jetty or Tomcat for small Linode

We use Tomcat mainly because somebody did this decision years ago and there's little point to switch to something else.


Both can be used, and there is no "standard" as such, but they have a few key differences:

Jetty has traditionally had better support for embedding within your own code (starting from code, for instance a test), although I hear this has gotten better in Tomcat 7. Jetty is probably the fastest of the two, while Tomcat has much higher standards compliance. If your application is to be run on a different applications server in production, Tomcat is probably the best choice.


You can use the Maven Tomcat plugin for deploying to Tomcat.

0

精彩评论

暂无评论...
验证码 换一张
取 消