Articles Tagged ‘jetty’

Creating Microservices with Bootique

Sunday, September 18th, 2016

When it comes to writing microservices in Java, plenty of tools and frameworks exist. In the following tutorial, I’d like to demonstrate another minimalistic framework called Bootique by implementing a simple microservice exposing its functions either as a RESTful web-service or as a runnable command executed using the command line. (more…)

Allocating available random Ports in a Maven Build

Wednesday, May 7th, 2014

Recently in a project I encountered the following problem: The development team used Git with a branch-per-feature-like workflow and the integration server, Bamboo in this case, was configured not only to run the integration-tests for the master-branch but also for every change in a feature branch.

As the team  developed a Java EE web application ports like 8080 occasionally were already bound and builds failed.

I knew a plug-in for Jenkins CI I to search for available ports and assign them to a build variable but I wanted to control such information directly within the Maven build life-cycle so I searched and finally found Sonatype’s Port Allocator Plug-in for Maven.

In the following short example I’m going to demonstrate how to allocate available random ports in a Maven build and assign them to an embedded servlet container.

(more…)

Embedding Jetty or Tomcat in your Java Application

Tuesday, July 9th, 2013

Recently I needed to control an embedded web container from a Java application and I wanted to see how this could be achieved using an embedded instance of either Tomcat or Jetty here.

In the following short examples I would like to show how to embed both servers in an application in no  time using Gradle or Maven as build tool.

(more…)

HTML5 Server Send Events using Node.js or Jetty

Sunday, October 21st, 2012

The HTML5 working draft describes different techniques to push information from a server to the client and the one described in this tutorial are Server-Send Events (SSE).

Using Server-Send-Events eliminates the need to poll a server periodically for information using AJAX and is really easy to implement because of the simple specification and the fact that nearly all modern browsers already implement this specification.

(more…)

Contract-First Web-Services using JAX-WS, JAX-B, Maven and Eclipse

Tuesday, August 23rd, 2011

Using the contract-first approach to define a web service offers some advantages in contrast to the code-first approach.

In the following tutorial we’re going to take a look at some details of this approach and we’re going to implement a real SOAP service using JAX-WS, Maven and the Eclipse IDE.

Finally we’re going to run our service implementation on an embedded Jetty instance and we’re going to take a look at soapUI and how to test our service using this neat tool.

(more…)

How to create a simple OSGi Web Application using Maven

Sunday, July 25th, 2010

In this tutorial we will take a look at the development of a simple OSGi Web Application and what tools can save us some time.

The Maven Bundle Plugin makes our life much easier here as does the OSGi Bundle Repository that offers some nice bundles – in our case the servlet API and an embedded Jetty web server.

So lets develop some bundles ..

(more…)

Search
Tags
Categories