permaculture playing cards*
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP 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: 22
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: 16160
    
  21

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: 22
Thank you Tim.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to view HTML code in jsf