Choosing an application server for web application development

孤街浪徒 提交于 2019-12-07 16:18:10

问题


My manager has asked me to suggest an application server for web application development work.

What are the factors that needs to be considered before we select any application server for web application development in Java J2EE development?

If I select one now and IN future and I want to change to some other application server, is that minimum effort to change?


回答1:


Apache Tomcat and Jetty are the two most popular web containers. Tomcat is the reference implementation of a Java servlet container, Jetty is a little bit faster and more lightweight. I personally favor Jetty, but you can't go wrong with either of them. A little comparison of the two can be found here.

Generally the migration of an application between web containers is fairly easy - only some configurations needs to be changed, but nothing in the source code(which is not always the case with full blown enterprise application servers).




回答2:


The answer is that you can make it more or less difficult to change application containers based on your development practices. For example, the Liferay portal includes the custom XML configuration files for many application containers, allowing it to be used on many containers. So, it's certainly possible to switch flexibly, but you have to re-do all the server-specific configuration files and you can't rely on container-specific features.

In some cases, the containers themselves make it difficult. For example, the JBoss classloader has a history of scant support for the actual J2EE and Java EE standards. This makes it easy to rely on non-standard features, and in some cases nearly impossible to use standard ones.

Besides making sure that your application server enforces standards compliance, you do want to make sure you need a full application server, as opposed to just a servlet container as mentioned above. Does your application need EJBs, or just servlets? If you aren't doing EJB development, then an application server is over-kill.

If you are doing EJB development or otherwise using other EE features beyond what a servlet container supplies, consider ease of configuration and administration along side standards compliance, and I think you'll find a server that fits your needs.




回答3:


A well written Java web application can be deployed on any web container, possibly with a bit of external configuration.

Hence you can choose the one that works the best for you during development, and then do testing on the target deployment server.

For netbeans, Tomcat is enclosed, and is fine. Eclipse does not have an enclosed web container yet, but Tomcat is supported.

In any case, use one that others use, then they can help you, and you them.




回答4:


For pure development purposes, I would like a server with

  • Small footprint and very minimal start/stop time.
  • IDE plugins

So, my vote goes to Jetty for web app.

If you are on Netbeans, Glassfish is not a bad choice either as it shows superb performance via grizzly that uses NIO.



来源:https://stackoverflow.com/questions/2692701/choosing-an-application-server-for-web-application-development

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!