XsltFilter

From Resin 3.0

(Difference between revisions)
Jump to: navigation, search
 
Line 14: Line 14:
 
  <top>
 
  <top>
 
   <section title="Top Section">
 
   <section title="Top Section">
     <p>This is some sample text.</p>
+
     &lt;p>This is some sample text.&lt;/p>
 
   </section>
 
   </section>
 
  </top>
 
  </top>

Revision as of 03:50, 1 December 2005

Documentation is at http://www.caucho.com/resin-3.0/servlet/filter-library.xtp#XsltFilter

resin-web.xml

<filter filter-name="xslt"
         filter-class="com.caucho.filters.XsltFilter"/>


Enabling the XSLT stylesheet in the servlet or JSP

Once the filter is configured, you can filter servlet or JSP output by setting the content-type to x-application/xslt.

test.jsp

<% response.setContentType("x-application/xslt"); %>
<top>
  <section title="Top Section">
    <p>This is some sample text.</p>
  </section>
</top>
Personal tools