apache > cocoon
 
Font size:      

JSP Reader in Cocoon (2.1 legacy document)

Warning
This document was copied as is from the Cocoon 2.1 documentation, but has not yet been fully reviewed or moved to its new home.

JSPReader

NAMEjsp
WHATThe JSPReader component is used to serve JSP page output data in a sitemap pipeline.
TYPEReader, Sitemap Component
BLOCKJsp
CLASSorg.apache.cocoon.reading.JSPReader
SINCECocoon 2.0
CACHEABLEno

Description

The JSPReader forwards requests to a JSP engine, and passing the JSP response immediatly as is.

Usage

The JSPReader is useful iff you want to serve the JSP response without any further Cocoon processing steps.

Sitemap pipeline examples

The following sitemap snippet uses the JSPReader to feed htm requests by JSP files.

...
<map:match pattern="*.htm">
  <map:read type="jsp" src="{1}.jsp" mime-type="text/html" />
</map:match>
...
       

Sitemap component configuration example

<map:readers...
  <map:reader name="jsp" 
    src="org.apache.cocoon.reading.JSPReader"
    logger="sitemap.reader.jsp" 
  />
...
       

Configuration

The JSP Reader has no configuration options.

Setup

The JSP Reader has no setup options.

Effect on Object Model and Sitemap Parameters

Bugs/Caveats

The JSP Reader depends on the accessibilty of a JSP engine from within the Cocoon servlet. A JSP must be properly configured for using the JSP Reader.

History

12-25-02: created initial version by Bernhard Huber

See also

Feeding JSP and passing the content into further Cocoon processing the JSPGenerator is appropriate for this task.

Moreover setting up a preprocessing Servlet Filter would be the most general solution to feeding JSP content.

Comments

add your comments