I'm using JSTL 1.2 and am trying to incorporate a <c:out ...> tag in my JSP page. What I want to do is use the member value from my backing bean as the value to be displayed for a form input element, and I want any HTML/XML special characters escaped.
In searching for examples (including in the JSTL spec), I can't find any that do what I'm trying to do, and I'm wondering if I'm misunderstanding the usage of the tag.
By the way, I added a simple <c:forEach ...> block to my JSP page, just to make sure that the JSTL stuff is set up correctly, and got the output I was expecting (it just output 10 numbers with <br> line breaks).
My JSP page includes the following useBean line My original (working) input tag looks like this:
Note that the getMemberNameEncoded() method is a special accessor method I created on the Bean to escape any HTML/XML special characters (this additional method is what I'm trying to avoid).
Now, I would like to use the <c:out> tag to get the value from the bean rather than using the JSP Expression. I see the format for the <c:out> tag is supposed to look like this: but I can't see how to get this into the above input element.
Can someone please show me the correct syntax for doing this?