Two Laptop Bag*
The moose likes Struts and the fly likes html escape chars on page rendering Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html escape chars on page rendering" Watch "html escape chars on page rendering" New topic
Author

html escape chars on page rendering

Mohit Agarwal
Ranch Hand

Joined: Mar 30, 2004
Posts: 88
Hi,

Please provide the solution for the following problem :

on my page things should appear as:

Are you Married?
radio-button(Yes) radio-button(No).

So a married is a link which is defined as a href=# onmouseov=some content.

The problem is that "Are you married?" is read from the data-base.
I made a java-bean which contains the display property.

After fetching the display i edit it to show the link.

The anchor tag i am adding through my java-code to the display is interpreted with escape chars for less than, gretaer than & quotes so the entire anchor tag appaers on the screen
which is not wanted ?

Any help or suggestions are most welcome.

By the way , i had these placed these bean objects in a map and the map is a part of the form-bean.
I iterating through the map using the nested:iterate tag.

Thanks in advance.

Mohit.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you're using the <bean:write> tag to display this information, specify filter="false". This will tell Struts not to escape certain characters.

If you're using <cut>, specify escapeXml="false".
[ January 12, 2006: Message edited by: Merrill Higginson ]

Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: html escape chars on page rendering