In this tutorial, you will learn to include graphs into a simple Java web application. Image below shows the graph generated at the end of the tutorial. Complete project is already moved to github for your references.This tutorial consists of two parts.First step is to create a simple web application with index.jsp that can submit a user entered parameter to a Servlet which is redirecting the user back to original index.jsp.Here the servlet is modified to return some data (collection of Customer objects) and index.jsp is modified to draw a chart using that data.Java web application project structure in Part 1 must be modified as shown in below image.Servlet class must return a list of Customers to the index.jsp. For that, a simple Customer class and a modification to Servlet is needed.This class is used to represent the data send to index.jsp from CustomerServlet. It has an id as well as age & salesCount.doGet() method is modified to return a list of Customer objects. This class has 10 Customer objects. Size of returned list will be based on the 'size' request parameter submitted via index.jsp. This Servlet will return that list as "customersList" to index.jsp.Download the plotly-latest.min.js Javascript file from here . Place this file under src/main/webapp/plotly/js directory as shown in image.index.js file needs below changes.1. Add plotly javascript file to index.jsp2. Javascript function to draw chart3. Add a DIV for chart4. Update index.jsp to organize data for Javascript5. Update index.jsp to draw chartFully completed index.jsp page code looks as below, do not worry. Each change is explained in details after the code.Each change has a specific reason.[post_ads]A reference to plotly Javascript file is placed within