Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Escape HTML Encoding in Struts Tags!!!

843840Jul 24 2008 — edited Jul 25 2008
Hi,

I am using a <html:multibox /> as below.

<logic:iterate name="user" property="children" id="child">
<html:multibox name="user" property="selectedChildren" >
<bean:write name="child" />
</html:multibox>
<bean:write name="child"/>

</logic:iterate>

'children' and 'selectedChildren' are both String arrays. One of the strings in the array has an '&' character, like 'John & Jim'. The jsp is rendered correct but when the form is posted back the checkbox value is posted as 'John & Jim' which is causing some issues for me.
I assumed there was an 'escape' attribute on 'html:multibox' which whenset to true would escape html encoding but apparently that attribute does not exist.

Can anyone tell how I can over ride the html encoding, so I can get the correct string format in my action bean?

Thank you in advance for any help/
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 22 2008
Added on Jul 24 2008
3 comments
3,254 views