title: How to set the variable to 2 decimal places
body: <p>I'm creating a variable in <code>JSTL</code> using </p>
  
  <pre><code>&lt;c:set var="billableTime" value="${ps.computedAmount}" /&gt;
  </code></pre>
  
  <p>My problem is <code>ps.computedAmount</code> is not a 2-digit decimal and I want the <code>ps.computedAmount</code> to be rounded off to 2-decimals before assigning to <code>billableTime</code>. I know how to display a 2-digit number in <code>JSTL</code> by using  </p>
  
  <pre><code>&lt;fmt:formatNumber type="number" minFractionDigits="2" maxFractionDigits="2" value="${ps.computedAmount}" /&gt;
  </code></pre>
  
  <p>But my problem is about assigning a 2-digit value to a <code>JSTL</code> variable. </p>