Tody.Lu
Tody.Lu

Reputation: 975

How to implement a webservice (like Jenkins) which can deploy simply in Java

I know little about Java. I want to know how Java implement an web-service which can deploy simply.

I find Jenkins can deploy without any servlet container (like as Tomcat). It can be ran using "java -jar jenkins.war --httpPort=xxx". I want to study the source code of Jenkins. But it is complicated. I can't find where Jenkins parse "httpPort" option.

who can help me to analyze the implementation of Jenkins? Thanks.

Upvotes: 1

Views: 704

Answers (3)

Satheesh Cheveri
Satheesh Cheveri

Reputation: 3679

I believe you want to create and deploy a web service in java. If that is the case, Apache CXF would be best framework to start on. There are hundreds of tutorials and active forums are available.

Below link would help you to start developing simple webservice in CXF ( this would work even with out Tomcat container) http://www.benmccann.com/dev-blog/web-services-tutorial-with-apache-cxf/

Upvotes: 1

uldall
uldall

Reputation: 2558

What you are looking for is probably an embeddable servlet container.

Good examples are:

You can find a tutorial on Jetty here: http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty

Upvotes: 1

Bohemian
Bohemian

Reputation: 425053

Have a look at Jetty, which is a lightweight container you can deploy into. It's often used for unit testing where a container is needed - it starts practically immediately.

Upvotes: 1

Related Questions