Back to Catalog

Consuming a RESTful Java web service with ReactJS

BeginnerGuided Project

Explore how to access a simple RESTful web service and consume its resources with ReactJS in Open Liberty.

4.3 (44 Reviews)

Language

  • English

Topic

  • Open Liberty

Enrollment Count

  • 238

Skills You Will Learn

  • Java

Offered By

  • IBM

Estimated Effort

  • 20 minutes

Platform

  • SkillsNetwork

Last Update

  • May 1, 2024
About This Guided Project
You will learn how to access a REST service and deserialize the returned JSON that contains a list of artists and their albums by using an HTTP client with the ReactJS library. You will then present this data by using a ReactJS paginated table component.
ReactJS is a JavaScript library that is used to build user interfaces. Its main purpose is to incorporate a component-based approach to create reusable UI elements. With ReactJS, you can also interface with other libraries and frameworks. Note that the names ReactJS and React are used interchangeably.
The React application in this guide is provided and configured for you in the src/main/frontend directory. The application uses the Create React App prebuilt configuration to set up the modern single-page React application. The create-react-app integrated toolchain is a comfortable environment for learning React and is the best way to start building a new single-page application with React.
The REST service that provides the resources was written for you in advance in the back end of the application, and it responds with the artists.json in the src/resources directory. You will implement a ReactJS client as the front end of your application, which consumes this JSON file and displays its contents on a single-page webpage.
To learn more about REST services and how you can write them, see the Creating a RESTful web service guide.

Created by 

The Open Liberty Project team