Java – slim application server for demonstrating web applications?

I have a small pet web application project. I want to talk to those who don't have an application server (and who don't have any clues about the application server)

What is the simplest and quickest way to run a war file with zero configuration? The best is the file I can send or bundle with the war file? For example, does jetty have a compact version? What else?

Solution

You can easily create your own compact version

http://docs.codehaus.org/display/JETTY/Embedding +Jetty

http://jetty.mortbay.org/xref/org/mortbay/jetty/example/LikeJettyXml.html

To run embedded jetty, you only need to use the following jar on the classpath:

* servlet-api-2.5-6.x.jar
* jetty-util-6.x.jar
* jetty-6.x.jar


/usr/local/jetty-6.1.4/lib> ls -la servlet-api-2.5-6.1.4.jar jetty-*
-rw-rw-r--  1 wwwrun admin 476213 2007-06-15 08:42 jetty-6.1.4.jar
-rw-rw-r--  1 wwwrun admin 128026 2007-06-15 08:40 jetty-util-6.1.4.jar
-rw-rw-r--  1 wwwrun admin 131977 2007-06-15 08:40 servlet-api-2.5-6.1.4.jar

Very light

Alternatively, Maven plugin can also be used

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>