i am putting <input type="text" name="Job Name" value=""/> inside private List<String> dataFields; and iterate it in my jsp page with struts like :
<logic:iterate name="dataFields" id="dataFieldsId"> <p> List Messages <bean:write name="dataFieldsId"/> </p> </logic:iterate>
but my browser instead of showing me a input box, it prints me the exact String that i have put in my action class, i mean this : <input type="text" name="Job Name" value=""/> what can i do to solve this?
edit ———
actually the above syntax is for struts 1, i changed my iterator to struts 2 and the code now is :
<s:iterator value="dataFields" var="dataFieldsId"> <p> <s:property escapeHtml="false" value="dataFieldsId" /> </p> </s:iterator>
and it is working like a charm
It’s because the value is filtered for HTML characters and they are replaced by their entity equivalents. Try the
filterattribute like so: