| org.apache.cocoon.acting.AbstractAction org.apache.cocoon.acting.ServiceableAction org.apache.cocoon.acting.RequestParamAction
RequestParamAction | public class RequestParamAction extends ServiceableAction implements ThreadSafe(Code) | | This action makes some request details available to the sitemap via parameter
substitution.
{context} - is the context path of the servlet (usually "/cocoon")
{requestURI} - is the requested URI without parameters
{requestQuery} - is the query string like "?param1=test" if there is one
Additionlly all request parameters can be made available for use in the sitemap.
if the parameter "parameters" is set to true.
(A variable is created for each request parameter (only if it doesn't exist)
with the same name as the parameter itself)
Default values can be set for request parameters, by including sitemap parameters
named "default.".
Sitemap definition:
<map:action name="request" src="org.apache.cocoon.acting.RequestParamAction"/>
Example use:
<map:match pattern="some-resource">
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:parameter name="default.dest" value="invalid-destination.html"/>
<map:redirect-to uri="{context}/somewhereelse/{dest}"/>
</map:act>
</map:match>
Redirection is only one example, another use:
<map:match pattern="some-resource">
<map:act type="request">
<map:parameter name="parameters" value="true"/>
<map:generate src="users/menu-{id}.xml"/>
</map:act>
<map:transform src="menus/personalisation.xsl"/>
<map:serialize/>
</map:match>
etc, etc.
author: Marcus Crafter author: Torsten Curdt version: CVS $Id: RequestParamAction.java 433543 2006-08-22 06:22:54Z crossley $ |
MAP_CONTEXTPATH | final public static String MAP_CONTEXTPATH(Code) | | |
PARAM_DEFAULT_PREFIX | final public static String PARAM_DEFAULT_PREFIX(Code) | | |
PARAM_PARAMETERS | final public static String PARAM_PARAMETERS(Code) | | |
Fields inherited from org.apache.cocoon.acting.ServiceableAction | protected ServiceManager manager(Code)(Java Doc)
|
Methods inherited from org.apache.cocoon.acting.ServiceableAction | public void service(ServiceManager manager) throws ServiceException(Code)(Java Doc)
|
Fields inherited from org.apache.cocoon.acting.AbstractAction | final protected static Map EMPTY_MAP(Code)(Java Doc)
|
|
|