Skip to Content
OpenShift for Developers
book

OpenShift for Developers

by Grant Shipley, Graham Dumpleton
September 2016
Intermediate to advanced
100 pages
2h 5m
English
O'Reilly Media, Inc.
Content preview from OpenShift for Developers

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

DevOps with OpenShift

DevOps with OpenShift

Stefano Picozzi, Mike Hepburn, Noel O'Connor
OpenShift for Developers, 2nd Edition

OpenShift for Developers, 2nd Edition

Joshua Wood, Brian Tannous
Getting Started with OpenShift

Getting Started with OpenShift

Steve Pousty, Katie Miller
Deploying to OpenShift

Deploying to OpenShift

Graham Dumpleton

Publisher Resources

ISBN: 9781491961421Errata Page