title: Displaying a string value in a JSP
body: <p>I am getting value of Total Price in the 1st Line of code and I am able to see the value written also in 6th line of this code, BUT when I am trying to send this value to another JSP in a form in 5th line of this code then I am getting null value. I know its a bad idea to write scriptlets in JSP but I am learning JSF, for time being kindly guide me how can I get value string "s" in billing.jsp? </p>
  
  <pre class="lang-html prettyprint-override"><code>    &lt;div&gt;Total price: $&lt;span class="total-cart"&gt;&lt;/span&gt;&lt;/div&gt; // Here I am 
      getting total price value lets say $10
  
      &lt;%String s="&lt;span class=total-cart&gt;&lt;/span&gt;";%&gt; // here I stored the 
      total price $10 in a string "s"
  
        &lt;form name="billing" action="billing.jsp"&gt;        &lt;div&gt;
      &lt;input type="hidden" name="price" value="&lt;%=s%&gt;"/&gt; // Here Unable to get 
   // the s value $10 and thus unable to send this $10 to another JSP
   // billing.jsp
      &lt;input type="submit"/&gt; Order now &lt;%=s%&gt;// But here I am getting value$10 
  
    &lt;/div&gt;
        &lt;/form&gt;
  </code></pre>
  
  <p>Billing.jsp</p>
  
  <hr>
  
  <pre class="lang-html prettyprint-override"><code> &lt;%
  
  String price=""; 
  
   price=request.getParameter("price").toString();
  out.println(price);  // Here I want to display the value of string "s" that 
  // is total price $10 but getting null value
  
   %&gt;
  </code></pre>
  
  <p>Kindly help me where I am wrong</p>