Timothy Larson wrote:

I did not find out how to get the {1} from the sitemap,
but this XSP page and XSP-Action may help you with calling resources.


Really thanks Timothy.. it works well....

This is my action....
--------------------------------------------------------------
<?xml version="1.0"?>
<xsp:page language="java"
 xmlns:xsp         = "http://apache.org/xsp";
 xmlns:xsp-action  = "http://apache.org/cocoon/action/1.0";
 xmlns:xsp-util    = "http://apache.org/xsp/util/2.0";>
 <null>
   <xsp:logic>
       String resource=parameters.getParameter("resource","");
       if(resource!=""){
           try{
               XSPUtil.getSourceAsString(resource, resolver);
                   <xsp-action:set-success/>
           }catch (Exception exception){
               <xsp-action:set-failure/>
           }
       }else{
           <xsp-action:set-success/>
       }
   </xsp:logic>
 </null>
</xsp:page>
--------------------------------------------------------------

and in the pipeline....

--------------------------------------------------------------
<map:act type="xsp-action" src="actions/callpipeaction.xsp">
 <map:parameter name="resource" value="cocoon:/internals/loaduser/{1}"/>
 <map:redirect-to uri="home"/>
</map:act>
<map:redirect-to uri="problems"/>
--------------------------------------------------------------

as you can see you can get the sitmap parameter with

String resource=parameters.getParameter("resource","");


Thanks again..


Luca Marchetti


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to