Search code examples
javajspstrutsstruts-1

perform action on bean property struts jstl


I have bean (name=tF) in Struts as of now we are performing operation on its variables using scriplets can someone help in removing scriplets and using jsp tags or Struts tag

 <bean:define name="tF" property="varin"  id="lvarin"  type="java.lang.Integer"/> 
    <%=(lvarin.intValue()/100.00) %>

Solution

  • You can use jstl 1.2

     <bean:define name="tF" property="varin"  id="lvarin"  type="java.lang.Integer"/> 
        ${(lvarin.intValue()/100.00)}