Display string based on values in JSP, Struts

I’m trying to display the values in terms of lakhs and crores in JSP page. The condition is something like this

For 100000, it should display 1 lakh,
For 200000, it should display 2 lakhs,
For 10000000 it should display 1 Crore. I'm not able to get the exact condition how to enable it. Here is my code 

<select name="sumAssured" class="sumAssured" id="sumAssuredDktp" data-action="change:edit" data-actionLoc="offer:healthCover">
                                <s:iterator value="%{#sumAssuredList}" var="sa" status="rowstatus">
                                    <fmt:formatNumber value="${sa/100000}" minFractionDigits="0" maxFractionDigits="1" var="saLakh"/>
                                    <option value="<s:property value="%{#sa}"/>" <s:if test="%{#sa == #sumAssured.toString()}"> selected="" </s:if> >
                                            ${saLakh} Lakh<c:if test="${saLakh > 1.0}">s</c:if>

Source: jsp

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.