Date: 2004-08-11T09:04:18
Editor: LarsHuttar <[EMAIL PROTECTED]>
Wiki: Cocoon Wiki
Page: XSPEnvironment
URL: http://wiki.apache.org/cocoon/XSPEnvironment
no comment
Change Log:
------------------------------------------------------------------------------
@@ -2,7 +2,7 @@
=== Default Variables ===
-The boiler plate code created in the generation of the compiled form of an XSP
+The boiler plate code created in the generation of the compiled form of an XSP
page includes a number of default variables:
* context - !ServletContext
@@ -14,6 +14,18 @@
'''Note''': is this subsequent to change?
+For example, you could access sitemap parameters in your XSP page as follows:
+
+{{{
+<xsp:page language="java" xmlns:xsp="http://apache.org/xsp">
+ <my-root>
+ <xsp:logic>String id = parameters.getParameter("id", "-1");</xsp:logic>
+ <id><xsp:expr>id</xsp:expr></id>
+ </my-root>
+</xsp:page>
+}}}
+
+
=== Helpers ===
There are a number of helper classes which contain utility code for XSP
classes.
@@ -25,7 +37,7 @@
* {{{XSPObjectHelper}}}
-Responsible for taking expressions and producing [:SAX] events from them. The
{{{xspExpr}}} element is overloaded to take a number of different object types
(Java primitives, String, Collection, XMLizable, Node, Object). Therefore the
expression in an {{{xsp:expr}}} element must return one of these types.
+Responsible for taking expressions and producing [:SAX] events from them. The
{{{xspExpr}}} element is overloaded to take a number of different object types
(Java primitives, String, Collection, XMLizable, Node, Object). Therefore the
expression in an {{{xsp:expr}}} element must return one of these types.
* {{{org.xml.sax.ContentHandler}}}
@@ -33,7 +45,7 @@
A single instance of an {{{AttributesImpl}}} object is used in passing
parameters to startElement calls on the {{{ContentHandler}}}. The attributes
are cleared after each call.
-There are several other helpers that are likely to be encountered in
+There are several other helpers that are likely to be encountered in
XSP soure code:
* {{{XSPRequestHelper}}}