Hi,

I am trying to use the sunrise actions for my authentication but unable to pass parameters to my xsp.
My problems:
1. My authentication fails even though I supply the correct username and password. The fail.xsp is being generated.
2. The reason is the parameters.getParameter is not fetching any values - I believe they are getting lost. If I print the parameters the values are null.
3. I have read in the list that even though you can't pass sitemap parameters to a file generator (xsp) you can use request-parameters.
4. I was wondering if I moved the authentication resource to the subsitemap, would the parameters get preserved? But I don't know how to refer to a subsitemap pipeline from the main sitemap.
<authentication uri="cocoon://myexecutelogin"/> - what should this be?


This is my cocoon sitemap:
<map:action name="sunRise-auth" src="org.apache.cocoon.sunshine.sunrise.acting.AuthAction">
<handlers>


<handler name="myhandler" xmlns:map="http://apache.org/cocoon/sitemap/1.0"; xmlns:sunshine="http://sunshine.sundn.de/sunshine/1.0";>
<!-- The login resource -->
<redirect-to uri="cocoon:raw://myloginpage"/>
<authentication uri="cocoon://myexecutelogin"/>
</handler>


*****
<map:match pattern="myexecutelogin">
        <map:generate type="xsp" src="myapp/xsp/login.xsp">
        <map:parameter name="use-request-parameters" value="true"/>
        </map:generate>
        <map:serialize type="xml"/>
 </map:match>
-----------------------------------------------
This is my app sitemap (subsitemap):


<map:match pattern="dologin"> <map:act type="sunRise-login"> <map:parameter name="handler" value="myhandler"/> <map:parameter name="parameter_name" value="request:Username"/> <map:parameter name="parameter_password" value="request:Password"/> <map:redirect-to uri="menu.xml"/> </map:act> <!-- authentication failed: --> <map:generate type="xsp" src="xsp/fail.xsp"/> <map:serialize/> </map:match>

----------------------------------------------
login.xsp

<xsp:logic>
            <![CDATA[
      String user="";
      String password="";
     try{
     user = parameters.getParameter("parameter_name");

     password = parameters.getParameter("parameter_password");
 }    catch(Exception t){t.printStackTrace();}

    // doing authentication with ldap server..................
   login=Myappauth.login(user,password);
]]>
</xsp:logic>


<xsp:logic> <![CDATA[ if (login==true){ ]]> <authentication> <ID><xsp:expr>user</xsp:expr></ID> <!--role>rolename</role> <data> ... resource specific data for the user </data--> </authentication>

      <![CDATA[
       } else  if (login==false){
     ]]>
      <authentication>
                <data>
                    ... resource specific data for the user
                </data>
      </authentication>


<![CDATA[ } ]]> </xsp:logic>

-----------------------------------------------



Any help really appreciated.
Thanks
Raj

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* http://join.msn.com/?page=features/junkmail



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



Reply via email to