This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSF and the fly likes how to view HTML code in jsf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "how to view HTML code in jsf" Watch "how to view HTML code in jsf" New topic
Author

how to view HTML code in jsf

tony altaico
Greenhorn

Joined: Jan 31, 2009
Posts: 21
Hello

I have html code which comes from database and I want to show it in my jsf page. Unfortunately, as usual when I want to display it in jsf page it displays HTLML codes which needs to be viewed as plain text.

Is there any method in java / jsf which displays HTML code as plain text ?? Anyone can offer me HTML viewer for that?

I would be glad if you can help me..You can show the codes how I call html code from jsf and how I get it from databse in java?

Cheers


Inside XHTML:



Inside Java :



Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15964
    
  19

By default, when an outputText element is coded and the value is HTML, outputText will convert the text so that the raw HTML displays.

If you want to display the HTML as formatted HTML instead, add the "escape="false"" attribute to the outputText element.


Customer surveys are for companies who didn't pay proper attention to begin with.
tony altaico
Greenhorn

Joined: Jan 31, 2009
Posts: 21
Thank you Tim.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to view HTML code in jsf
 
Similar Threads
JSF and trying to display a resultset
json object send to JSF backing bean to xhtml page
hide email and password on contactus jsp
firefox dispay issue
Struts2 Data Transfer