O'Reilly logo

Developing Responsive Web Applications with AJAX and jQuery by Sandeep Kumar Patel

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

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