getting around html encoding in outputText tag (JSF)

N

nadlox

Hi,

I'm getting a value to my JSP page (using JSF) with outputText from a
bean that has html encoding in it.

How could I temper with the HTML encoding so that I could preserve
certain tags? I need to have a few <BR> inside the text and want'em
displayed in HTML code, not &lt;BR&gt; etc...

What I'm doing is having a properties file for end users to modify. And
since there are some longer texts, they want to add paragraphs and line
breaks every now and then. So I've written a method that searches the
string for example \n and replaces'em with <br> just before this string
is sent to JSP. But now the encoding happens...

Or what would be the smartest way?

Regards,
Niko
 
H

hiwa

<h:eek:utputText> action has, luckily, escape attribute.
If it is set to false, <BR> would remain <BR>.
Try it.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top