I get it. You should use request.getParameter("user") rather than
parameters.getParameter("user") in your XSP server page to access the user
information.

Below the XSP code that works

<xsp:page language="java"
          xmlns:xsp="http://apache.org/xsp";
              xmlns:esql="http://apache.org/cocoon/SQL/v2";
              xmlns:log="http://apache.org/xsp/log/2.0";
              xmlns:xsp-request="http://apache.org/xsp/request/2.0";>

<xsp:structure>

<xsp:include>org.apache.avalon.framework.parameters.ParameterException</xsp:
include>
</xsp:structure>

<xsp:logic>

        private  String getUserName ()  {
                try {
                        return request.getParameter("myName");
                }catch (ParameterException pe) {
                        return "xxxxx" ;
                }
        }

        private  String getPassword ()  {
                try {
                        return request.getParameter("myPass");
                }catch (ParameterException pe) {
                        return "xxxxx" ;
                }
        }

</xsp:logic>

  <page>
   <log:debug>Processing the beginning of the authentication page
</log:debug>

   <content>

        <esql:connection>
     <esql:pool>portal</esql:pool>
     <esql:execute-query>

       <esql:query>
        SELECT id,password,color from PORTALUSER_TABLE where id =
'<xsp:expr>getUserName()</xsp:expr>' and password =
'<xsp:expr>getPassword()</xsp:expr>'
       </esql:query>

       <esql:results>
         <esql:row-results>
           <authentication>
                        <ID>
                                <esql:get-string column="id"/>
                        </ID>
                        <color>
                                <esql:get-string column="color"/>
                        </color>
                        <userName>
                            <xsp:logic>
                        getLogger().debug("UserName::" + getUserName() + " password::" 
+
getPassword());
                                    </xsp:logic>
                        </userName>
                </authentication>
         </esql:row-results>
       </esql:results>

     </esql:execute-query>
        </esql:connection>

   </content>
        <log:debug>Processing the end of the page</log:debug>
  </page>
</xsp:page>

Enjoy

Senhaji

-----Message d'origine-----
De : Senhaji [mailto:osenhaji@;wanadoo.fr]
Envoyé : mardi 5 novembre 2002 16:55
À : [EMAIL PROTECTED]
Objet : RE: Authentication Resource


Thanks Mark I'll try this. I didn't try the getParameter method yet

-----Message d'origine-----
De : [EMAIL PROTECTED] [mailto:Markdelanoy@;aol.com]
Envoyé : mardi 5 novembre 2002 16:20
À : [EMAIL PROTECTED]
Objet : Re: Authentication Resource


You'll need to confirm this but look in cocoon's sitemap.log.  You should
see the pipeline parameters being passed around.

in the sitemap your passing cocoon parameters but in the XSP your looking in
the HTTP request.  Try looking in the parameters, e.g.
parameters.getParameter( name ); parameters.getParameter( pass );

the names of the username password duo are the same spelling as in the
sitemap.

also make sure your login page widget id/name s are the same as request:..
in the sitemap and then look for cocoon parameters named the same as the
sitemap instead of http request parameters named as you have in your login
page.

so try that.

md

---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to