3 Replies Latest reply on Oct 26, 2007 8:13 PM by chen Jianping

    How can I output my html snippet from database in seam ? all

    chen Jianping Newbie

      I'm newbie using seam.
      I want to output my html snippet from database ,but all < and > become &gt; and &lt;.
      How can I replace &gt; and &lt; to < and > ?
      MY backing bean is :

      import org.jboss.seam.annotations.Name;
      @Name("htmltest")
      public class Htmltest {
       public String g() {
       return "<html><body><h1>testhtml</h1></body></html>";
       }
      }
      

      and my xhtml is :
      <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
       xmlns:ui="http://java.sun.com/jsf/facelets"
       template="layout/template.xhtml">
       <ui:define name="body">
       #{htmltest.g()}
       </ui:define>
      </ui:composition>