Running the Jetty web servlet

Since we have included the Jetty plugin in our Gradle build, the targets of the plugin are available. To start Jetty is as easy as typing the following:

gradle appRun

This will compile the code, build the WAR file, and start the Jetty servlet container. To help us remember, it also prints the following on the command line:

Running at http://localhost:8080//hello

We can open this URL and see the opening screen of the game with the colors that the program created as a first guess:

Now, it is time to have some fun and play with our game, giving answers to the program. Do not make it easy for the code! Refer to the ...

Get Java Projects - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.