cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Haul <h...@dvs1.informatik.tu-darmstadt.de>
Subject Re: Parameters
Date Thu, 18 Sep 2003 07:15:15 GMT
On 17.Sep.2003 -- 05:41 PM, Diego Cattelan wrote:
> Hi
> I'm new to Cocoon system and I don't understand how to pass parameters from
> sitemap:
> sitemap.xmap:
> ....
>        <map:match pattern="auth_entra">
>         <map:generate src="../globals/authentication/auth.xsp" type="serverpages">
>             <map:parameter name="username" value="topolino"/>
>             <map:parameter name="password" value="topolinopw"/>
>             <map:parameter name="action" value="entraTest"/>
>         </map:generate>
>         <map:serialize type="xml"/>
>       </map:match>
> ....
> auth.xsp:
> <xsp:page language="java"
>     xmlns:xsp="http://apache.org/xsp"
>     xmlns:esql="http://apache.org/cocoon/SQL/v2"
>     xmlns:xsp-request="http://apache.org/xsp/request/2.0">
>     
>     <authentication>
>         username =  <xsp-request:get-parameter name="username"/>

Alright, xsp-request:get-parameter refers to request parameters
(i.e. submitted with a form) but you're interested in sitemap
parameters. If you prefer to use a logicsheet to read them, use the
util logicsheet tag 

   <util:get-sitemap-parameter name="username"/>

if you prefer to do in in JAVA (you shouldn't), it's

   parameters.getParameter("username", "default")

See Apache Avalon Framework API docs on Parameter for all ways to
access parameters and their implications.

I'm afraid that input modules don't have access to sitemap
parameters.

	Chris.
-- 
C h r i s t i a n       H a u l
haul@informatik.tu-darmstadt.de
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message