I am new to JSP and am having trouble with an if statement.

<c:if test="#{authorizedProduct.product.product.orderMethod}=='H'">
  <h:outputText id="orderMethod" value="#{authorizedProduct.product.product.orderMethod}"/>
</c:if>

The order method does equal H because it will display that if I don't put in inside the if statement. Can someone help me with my if statement syntax please?

I figured it out. Changed it to this.

<c:set var="OrderMethod" value="#{authorizedProduct.product.product.orderMethod}"></c:set>
<c:if test="${OrderMethod != null}">
  <h:outputText id="orderMethod" value="#{authorizedProduct.product.product.orderMethod}" />
</c:if>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.