Two Laptop Bag*
The moose likes JSF and the fly likes Displaying HTML on a JSF web Page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Displaying HTML on a JSF web Page" Watch "Displaying HTML on a JSF web Page" New topic
Author

Displaying HTML on a JSF web Page

Abiodun Adisa
Ranch Hand

Joined: Jan 17, 2002
Posts: 495
I have the folowing entry in the database



and i will like it to display on my web page, it should escape the html and the word this needs to be bold,

I have tried hutputText , escapeHtml ="true" and escapeHtml="false" and the word this is not bold

Please how do i resolve this
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15632
    
  15

I strongly recommend not putting raw HTML in an outputText element. I've seen problems come from that approach, and not only on the JSF platform. A more JSF-friendly (if less terse) solution for panelGrid and table cells looks like this:


Actually, use of the <em> tag even in non-JSF HTML in this day and age will get you abused by some people. CSS is the preferred mechanism now.

However, if you absolutely insist on using raw HTML in an outputText, the proper attribute name isn't "escapeHTML", it's simply "escape".


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Displaying HTML on a JSF web Page
 
Similar Threads
Does XSLT template declaration order matter?
Unable to display the image file in the jsp
HFSJ P408 jsp Include tag example
please solve this EL
Expression Language is not working in Jsp Tags