title: Transferring data from one JSP to another JSP file using request
body: <p>I am creating a bookstore application and was working on the checkout functionality. I ran into an issue where I am using this code to attempt to send data from shoppingCart.jsp to checkout.jsp.</p>
  <pre><code>ShoppingCart.jsp code:
  request.setAttribute(&quot;bookData&quot;, bookList);
          request.setAttribute(&quot;insert&quot;,&quot;insert&quot;);
  </code></pre>
  <p>I am using this in checkout.jsp</p>
  <pre><code>        &lt;%ArrayList&lt;Book&gt; bookstore = (ArrayList&lt;Book&gt;)request.getAttribute(&quot;bookData&quot;);
          String insert=(String)request.getAttribute(&quot;insert&quot;);
  
              %&gt;
          &lt;p&gt; You Purchased the following books: &lt;/p&gt;
          &lt;h1&gt;&lt;%=insert%&gt;&lt;/h1&gt;
  </code></pre>
  <p>However, all I am receiving is Null value as such.
  <a href="https://i.stack.imgur.com/8LkvA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8LkvA.png" alt="enter image description here" /></a></p>
  <p>Is there an issue with what I am doing? I could not find what I am doing wrong even after searching online. Any help would be appreciated.</p>
  <p>NOTE: I want to pass data from a JSP to a JSP and not a servlet to a JSP.</p>