Chapter 3. Adding Dynamic Visuals to a Web Application

In this chapter, we will learn how to create servlets returning JSON data followed by understanding the concepts of jQuery AJAX and promising and templating a library to render data in our page. In the later section of this chapter, we will learn how to create a carousel for the hero section.

Building a JSON servlet

In this section, we will develop a Java servlet that will return a list of products as a JSON array. Before building the servlet, we need to create a Java class named Product. This class is known as a Plain Old Java Object (POJO) as it does not implement any interface or extend any other classes. This class will have many different properties that we are going to use to store the ...

Get Developing Responsive Web Applications with AJAX and jQuery now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.