title: JSP custom tags null value
body: <p>I'm facing a problem with my own jsp tag. I want it to allow null-values, but if I want to give null-values to my handler, the value is 0 and not null.</p>
  
  <p>My Handler:</p>
  
  <pre><code>public class BigDecimalStripper extends SimpleTagSupport {
  
  private BigDecimal numberToStrip;
  
  public void setNumberToStrip(BigDecimal numberToStrip) {
      this.numberToStrip = numberToStrip;
  }
  
  @Override
  public void doTag() throws JspException, IOException {
      if (numberToStrip == null) {
          return;
      }
      JspWriter out = getJspContext().getOut();
      BigDecimal withoutTrailingZeros = numberToStrip.stripTrailingZeros();
      String formattedNumber = withoutTrailingZeros.toPlainString();
      out.println(formattedNumber);
  }
  }
  </code></pre>
  
  <p>My taglib:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;taglib&gt;
  &lt;tlib-version&gt;1.0&lt;/tlib-version&gt;
  &lt;jsp-version&gt;2.0&lt;/jsp-version&gt;
  &lt;short-name&gt;Fishie JSP Utils&lt;/short-name&gt;
  &lt;tag&gt;
      &lt;name&gt;BigDecimalStrip&lt;/name&gt;
      &lt;tag-class&gt;ch.fishie.jsp.utils.BigDecimalStripper&lt;/tag-class&gt;
      &lt;body-content&gt;scriptless&lt;/body-content&gt;
      &lt;attribute&gt;
          &lt;name&gt;numberToStrip&lt;/name&gt;
          &lt;required&gt;true&lt;/required&gt;
          &lt;rtexprvalue&gt;true&lt;/rtexprvalue&gt;
      &lt;/attribute&gt;
  &lt;/tag&gt;
  </code></pre>
  
  <p></p>
  
  <p>My JSP-code: </p>
  
  <pre><code> &lt;c:forEach items="${pagination.pageEntries}" var="aquarium"&gt;
                      &lt;tr&gt;
                          &lt;td class="name"&gt;&lt;c:out value="${aquarium.name}" /&gt;&lt;/td&gt;
                          &lt;td class="length"&gt;&lt;fu:BigDecimalStrip numberToStrip="${aquarium.length}" /&gt;&lt;/td&gt;
   .....
  </code></pre>
  
  <p>aquarium.length is null, but when it is set into the <code>BigDecimalStripper</code>, it is 0.
  Does someone see the mistake I make?</p>