Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to view HTML code in jsf

 
tony altaico
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18302
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
tony altaico
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Tim.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic