cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From beyaRecords - The home Urban music <...@beya-records.com>
Subject Actions and map pipelines
Date Mon, 05 Jan 2004 19:02:28 GMT
hi,
i have looked through many documents now about actions and have found 
nothing helpful. Could anyone show me how to reconstruct the following 
into an action/map-xspaction document:




<xsp:logic>
   // handle the previous page's values.
   String name = <xsp-request:get-parameter name="name"/>;
   String password = <xsp-request:get-parameter name="password"/>;
   int userid;

   <esql:connection>
     <esql:dbpool>mypool</esql:dbpool>
     <esql:execute-query>
       <esql:query>SELECT userid FROM users
         WHERE name=name
         AND password=password</esql:query>
       <esql:row-results>
         <xsp:logic>
           userid = <esql:get-int column="userid"/>
         </xsp:logic>
       </esql:row-results>
       <esql:no-results>
           <xsp-response:send-redirect url="/home"/>
       </esql:no-results>
     </esql:execute-query>
   </esql:connection>
</xsp:logic>

So the logic is return a recordset containing a single column and 
assign the value to a variable, but if the user does not exist then 
redirect the user to another page

regards


Uzo


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


Mime
View raw message