O'Reilly logo

Gradle Essentials by Abhinandan, Kunal Dabir

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3. Building a Web Application

Now that we have seen the ease of using Gradle for building a command-line Java application, we shouldn't be surprised to know that building web applications based on Java servlet specification is also equally easy with Gradle.

In this chapter, we will build a simple web application first, which is distributed as a WAR file that can be deployed to any servlet container. Then, we will take a look at how dependencies and repositories are configured in a build file.

Building a simple Java web project

Again, we will keep our application as minimal as possible and create a web-enabled version of the application, which we developed in the last chapter. The application will provide the user a form to input their name ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required