Hi,
I receive from the database HTML formatted Strings like that:
<b>Currently results</b>
Using the <bean:message> struts tag, I expect to display it on the
generated JSP page in bold. But, for some reason, the browser really
displays
<b>Currently results</b>
The source code is of course
<b>Current results</b>
So, somewhere happens a conversion, but I do not know where; I saw,
that before calling the <bean:message> tag, the string is still with
the formatted tags, which is ok.
Can somebody tell me what am I doing wrong? Do you have some example
that works?
Thank you very much for your help,
John
Roedy Green - 07 Mar 2008 23:13 GMT
On Fri, 7 Mar 2008 06:10:40 -0800 (PST), John
<gundam.f0rtre55@bluebottle.com> wrote, quoted or indirectly quoted
someone who said :
><b>Current results</b>
To convert those entities back to text, see
http://mindprod.com/products1.html#ENTITIES
to stop Struts from quoting them in the first place, you would have to
ask someone else.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Mark Space - 08 Mar 2008 04:17 GMT
> The source code is of course
>
> <b>Current results</b>
Have you looked in the database to see what is stored there? So you are
certain that the field contains <'s and >'s?
Show us the methods you use to retrieve this field from the database,
and the methods you use to send it to the client. An SSCCE would be ideal.
Tim B - 09 Mar 2008 20:37 GMT
> Hi,
> I receive from the database HTML formatted Strings like that:
[quoted text clipped - 20 lines]
> Thank you very much for your help,
> John
try setting the filter attribute of the bean:message tag to false:
<bean:message key="message.with.html" filter="false"/>
Arne Vajhøj - 09 Mar 2008 23:11 GMT
>> Hi,
>> I receive from the database HTML formatted Strings like that:
[quoted text clipped - 18 lines]
>
> <bean:message key="message.with.html" filter="false"/>
Does bean:message have filter ?
http://struts.apache.org/1.3.8/struts-taglib/tagreference.html#struts-bean.tld
indicates not (and that it may be necesarry to switch to bean:write).
Arne