cocoon-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stev...@outerthought.org
Subject [WIKI-UPDATE] InputModules Wed Jul 30 23:00:03 2003
Date Wed, 30 Jul 2003 21:00:03 GMT
Page: http://wiki.cocoondev.org/Wiki.jsp?page=InputModules , version: 20 on Wed Jul 30 20:18:07
2003 by TonyCollen

- 
+ ----
+ !!RequestParameterModule
+ 
+ This module allows access to request parameters.
+ 
+ __cocoon.xconf usage__:
+ {{{
+ <input-modules>
+   ...
+   <component-instance class="org.apache.cocoon.components.modules.input.RequestParameterModule"
logger="core.modules.input" name="request-param"/>
+   ...
+ </input-modules>
+ }}}
+ 
+ __Example Pipeline Fragment__:
+ {{{
+ <map:match pattern="bar">
+    <map:generate type="file" src="documents/{request-param:file}"/>
+    <map:transform src="stylesheets/{request-param:stylesheet}"/>
+    <map:serialize/>
+ </map:match>
+ }}}
+ This pipeline will match a request for "bar" and pass the request parameters "file" and
"stylesheet" to the generator and transformer, respectively.  (e.g. ''http://localhost:8080/cocoon/bar?file=doc.xml&stylesheet=main.xsl'').
+ 
+ __Note that directly passing request parameters for file access can be dangerous.__  Remember
to follow basic webapp safety rules when designing your pipelines.
+ 



Mime
View raw message