Chapter 5. Adding Dependencies and a Database
In the last chapter, we deployed a very simple Hello, world application. In this chapter we are going to create a new application that contains a more real-world example. In the application we will be building here the user will be insulted with a friendly message. What could be more fun than that? How about a Elizabethan insult chosen randomly? These Shakespearean insult words have been floating around the Internet since before dial-up. Let’s put them to good use complete with a database backend and a HTTP-based API. The insult consists of two adjectives and a noun and will look something like this:
Thou art a Mewling Motley-minded Vassal!
Let’s get started.
Creating the Base Application
We are going to start simple by deploying a static version of the insult application that simply randomly chooses an insult and then displays it on a JSP page. In a previous chapter, you learned how to fork an application on GitHub. We are going to following those steps so we have a starting point for this application that we will then modify.
Forking the Repository and Deploying the Application
Point your favorite browser to the project’s GitHub page.
Once you have the repository open in your browser, fork the repository by clicking on the Fork button on the top righthand side of the screen. This will create a copy of the repository that you can modify.
After the project has been forked to your account, the next step is to create a new project ...