title: how to Print arraylist in jsp using java method
body: <p>This is Java class:</p>
  
  <pre><code>package com.example;
  
  import java.util.ArrayList;
  
  public class sample {
  
      public void print() {
  
          ArrayList&lt;String&gt; l = new ArrayList&lt;String&gt;();
          l.add("a");
          l.add("b");
  
      }
  }
  </code></pre>
  
  <p>This is my Jsp page :</p>
  
  <pre><code>&lt;%@page import="java.awt.List"%&gt;
  &lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
  
  &lt;%@ page import="com.example.sample"%&gt;
  &lt;%@page import="java.util.*"%&gt;
  
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;%
      sample s = new sample();
  %&gt;
  
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I dont know how to call print merhod and how Print list in jsp page so that i print data in jsp page list please help me how i will Implement i am learning this.</p>