You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lars Hammer <ha...@dezide.com> on 2003/10/15 10:17:21 UTC

outputting html with bean:write

Hello

I'm trying to write the content of a bean property containing html to my page, but the html doesn't get interpreted by the browser.
The following code works :

< div style="height: 70; width: 200; border: 1px solid black; overflow: auto;" >
    <b>hello there</b>
< /div >

but this doesn't

< div style="height: 70; width: 200; border: 1px solid black; overflow: auto;" >
 < bean:write name="hit" property="comment"/ >
< /div > 

 
Is there something special about the way text is stored in a bean property?
 
-thanks
 
/Lars Hammer
http://www.dezide.com

Re: outputting html with bean:write

Posted by Nicolas De Loof <ni...@cgey.com>.
What html result do you get ?

If generated HTML has "<bean:write ....>" check if you included struts-bean taglig header in your jsp.

If generated HTML has "&lt;b&gt;hello ..." use filter="false" on bean:write to disable HTML markup filtering (active by
default)

Nico.


----- Original Message ----- 
From: "Lars Hammer" <ha...@dezide.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Wednesday, October 15, 2003 10:17 AM
Subject: outputting html with bean:write


Hello

I'm trying to write the content of a bean property containing html to my page, but the html doesn't get interpreted by
the browser.
The following code works :

< div style="height: 70; width: 200; border: 1px solid black; overflow: auto;" >
    <b>hello there</b>
< /div >

but this doesn't

< div style="height: 70; width: 200; border: 1px solid black; overflow: auto;" >
 < bean:write name="hit" property="comment"/ >
< /div >


Is there something special about the way text is stored in a bean property?

-thanks

/Lars Hammer
http://www.dezide.com


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org