AndyM
AndyM

Reputation: 622

Can a java .war file contain a webserver

I'm looking into installing Jenkins, in the instructions it says

"Easy installation: Just java -jar jenkins.war, or deploy it in a servlet container. No additional install, no database."

I understand the servlet container method, but does the above statement mean that just installing Java and running the .war file will somehow spinup a webserver and start serving http request ?

Upvotes: 3

Views: 211

Answers (2)

David Levesque
David Levesque

Reputation: 22451

Yes, the war file contains the built-in Winstone servlet container, and running that command will start it and make it listen for requests on port 8080.

Edit: Jenkins 1.535 and above bundles Jetty (rather than Winstone). You can still run it with java -jar jenkins.war.

Upvotes: 5

Brent Worden
Brent Worden

Reputation: 10994

Jenkins comes bundled with Winstone, a very lightweight servlet container. As such, Jenkins can be started from the command line as stated by the instructions without any additional software installation.

Upvotes: 1

Related Questions