blob: e6d9ee8cc03444b74ecee29238d6e7dfb7ef7be7 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document PUBLIC "-//APACHE//DTD Documentation V1.0//EN" "../../dtd/document-v10.dtd">
<document>
<header>
<title>JSP Reader in Cocoon</title>
<version>0.9</version>
<type>Technical document</type>
<authors>
<person name="Bernhard Huber" email="huber@apache.org"/>
</authors>
<abstract>This document describes the JSP Reader of Cocoon.</abstract>
</header>
<body>
<s1 title="JSPReader">
<table>
<tr>
<td>NAME</td><td>jsp</td>
</tr>
<tr>
<td>WHAT</td><td>The <code>JSPReader</code> component is used to serve JSP page output data
in a sitemap pipeline.
</td>
</tr>
<tr>
<td>TYPE</td><td>Reader, Sitemap Component</td>
</tr>
<tr>
<td>BLOCK</td><td>Jsp</td>
</tr>
<tr>
<td>CLASS</td><td>org.apache.cocoon.reading.JSPReader</td>
</tr>
<!--tr>
<td>DEPRECATED</td><td>Cocoon 2.0, 2.1</td>
</tr-->
<tr>
<td>SINCE</td><td>Cocoon 2.0</td>
</tr>
<tr>
<td>CACHEABLE</td><td>no</td>
</tr>
</table>
</s1>
<s1 title="Description">
<p>
The <code>JSPReader</code> forwards requests to a <em>JSP</em> engine, and
passing the <em>JSP</em> response immediatly as is.
</p>
</s1>
<s1 title="Usage">
<p>
The <code>JSPReader</code> is useful iff you want to serve the <em>JSP</em>
response without any further Cocoon processing steps.
</p>
<s2 title="Sitemap pipeline examples">
<p>
The following sitemap snippet uses the <code>JSPReader</code> to feed
<code>htm</code> requests by <em>JSP</em> files.
</p>
<source><![CDATA[
...
<map:match pattern="*.htm">
<map:read type="jsp" src="{1}.jsp" mime-type="text/html" />
</map:match>
...
]]></source>
</s2>
<s2 title="Sitemap component configuration example">
<p></p>
<source><![CDATA[
<map:readers...
<map:reader name="jsp"
src="org.apache.cocoon.reading.JSPReader"
logger="sitemap.reader.jsp"
/>
...
]]></source>
</s2>
<s2 title="Configuration">
<p>
The <code>JSP Reader</code> has no configuration options.
</p>
</s2>
<s2 title="Setup">
<p>
The <code>JSP Reader</code> has no setup options.
</p>
</s2>
<s2 title="Effect on Object Model and Sitemap Parameters">
<p>
</p>
</s2>
</s1>
<s1 title="Bugs/Caveats">
<p>
The <code>JSP Reader</code> depends on the accessibilty of a
<code>JSP</code> engine from within the Cocoon servlet.
A <em>JSP</em> must be properly configured for using the
<code>JSP Reader</code>.
</p>
</s1>
<s1 title="History">
<p>
12-25-02: created initial version by Bernhard Huber
</p>
</s1>
<s1 title="Copyright">
<p>
Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
</p>
</s1>
<s1 title="See also">
<p>
Feeding <em>JSP</em> and passing the content into further Cocoon processing
the <em>JSPGenerator</em> is appropriate for this task.
</p>
<p>
Moreover setting up a preprocessing <em>Servlet Filter</em> would be the most
general solution to feeding <em>JSP</em> content.
</p>
<!-- Links to related components pages -->
</s1>
</body>
</document>