XsltFilter

From CauchoWiki

Jump to: navigation, search


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

[edit] resin-web.xml

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


[edit] 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.

[edit] test.jsp

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