As I chearch the answer to my problem, thanks to the logs files, I note
that the parameters {1},{2}... in the matcher
'internet/espaceclient/*.*.*' are empty...
So the sitemap try to generate the page 'logic/espaceclient/.xsp' that
obviously doesn't exist !!

I saw in the sitemap.log that the variables are in fact ../1, ../2
I remember another mail that said : 
"On your '*.xsp' pipeline I noticed you used {1}. Once you use an action
it
sets a new context and you need to use {../1} to get to the ancestor (or
parent)."

So I tried whith {../1} instead of {1}... and it works better... 

Sorry for my questions...
Nicolas !!


> -----Message d'origine-----
> De : zze-STIENNE Nicolas FTRD/DMI/CAE 
> Envoye : jeudi 4 juillet 2002 11:27
> A : [EMAIL PROTECTED]
> Objet : RE: session...
> 
> 
> Thanks for this suggestion...
> 
> If I well understand, I have to put this part of code in the matcher I
> want to protect...
> 
> So I do...
> 
>      <map:match pattern="internet/espaceclient/*.*.*">  <!-- 
> the area I
> want to protect
> 
>         <!-- first validate whether user has logged in -->
>         <map:act type="session-validator">
>           <map:parameter name="descriptor"
> value="descriptors/params.xml"/>
>           <map:parameter name="validate"
> value="identifiant,nom,prenom,id,titre"/>
>           <!-- generate protected content -->
> 
>         <map:generate type="serverpages"
> src="logic/espaceclient/{1}.xsp"/>
>         <map:transform src="stylesheets/internet/{3}.xsl">
>           <map:parameter name="xml-file"
> value="../../documents/espaceclient/{2}.xml"/>
>           <map:parameter name="media" value="internet"/>
>           <map:parameter name="section" value="espaceclient"/>
>           <map:parameter name="css-stylesheet" value="styles.css"/>
>           <map:parameter name="toc-file"
> value="../../documents/toc.xml"/>
>           <map:parameter name="base-url" value="/cocoon/transrapide"/>
>         </map:transform>
>         <map:transform src="stylesheets/internet/menupage.xsl">
>           <map:parameter name="section" value="espaceclient"/>
>           <map:parameter name="toc-file"
> value="../../documents/toc.xml"/>
>           <map:parameter name="css-stylesheet" value="styles.css"/>
>           <map:parameter name="base-url" value="/cocoon/transrapide"/>
>           <map:parameter name="barre-logo"
> value="../../documents/logo.xml"/>
>           <map:parameter name="request-url" value="{1}.{2}"/>
>          <map:parameter name="media" value="internet"/>
>        </map:transform>
> <!--       <map:transform type="encodeURL"/>-->
>        <map:serialize/>
> 
>         </map:act>
>         <!-- something was wrong, redirect to login page -->
>         <map:redirect-to uri="espaceclient.info"/>
> 
>       </map:match>
> 
> 
> And I get this result
> If I request the page 'internet/espaceclient/test.bienvenue.info' I'm
> redirect to the 'espaceclient.info' page: that's good, 
> but if I submit the login and password and get this error message: 
> 
> type resource-not-found
> message Resource not found
> description The requested URI
> "/cocoon/transrapide/internet/espaceclient/test.bienvenue.info
> " was not
> found.
> 
> 
> NB: When I remove
>         <!-- first validate whether user has logged in -->
>         <map:act type="session-validator">
>           <map:parameter name="descriptor"
> value="descriptors/params.xml"/>
>           <map:parameter name="validate"
> value="identifiant,nom,prenom,id,titre"/>
>           <!-- generate protected content -->
> and
>         </map:act>
>         <!-- something was wrong, redirect to login page -->
>         <map:redirect-to uri="espaceclient.info"/>
> 
> It works well... I get my page 'test.bienvenue.info'
> 
> 
> Thanks for more explainations...
> Nicolas !!
> 
> PS: extract of the sitemap:
> 
>       <!-- ================= -->
>       <!-- Simple login page -->
>       <!-- ================= -->
>       <map:match pattern="internet/espaceclient/espaceclient.info">
>         <map:generate src="documents/espaceclient/login.xml"/>
>         <map:transform src="stylesheets/internet/info2.xsl">
>           <map:parameter name="section" value="espaceclient"/>
>           <map:parameter name="base-url" value="/cocoon/transrapide"/>
>        </map:transform>
>       <map:call resource="InternetMenuPage">
>         <map:parameter name="section" value="espaceclient"/>
>           <map:parameter name="request-url" value="{2}.{3}"/>
> <!--    <map:parameter name="" value=""/>-->
>         </map:call>
> <map:serialize/>
>       </map:match>
> 
>       <!-- ========================================= -->
>       <!-- Form target which performs auth service   -->
>       <!-- ========================================= -->
>       <map:match pattern="internet/espaceclient/do-login">
>         <!-- first validate whether submitted values are ok -->
>         <map:act type="form-validator">
>           <map:parameter name="descriptor"
> value="descriptors/params.xml"/>
>           <map:parameter name="validate" 
> value="identifiant,motpasse"/>
>           <!-- now try to log in -->
>           <map:act type="db-authenticator">
>             <map:parameter name="descriptor"
> value="descriptors/auth.xml"/>
>             <!-- now go to protected area -->
>             <map:redirect-to uri="protected"/>
>           </map:act>
>         </map:act>
>         <!-- something was wrong, try it again -->
>         <map:redirect-to uri="login1"/>
>       </map:match>
> 
>       <!-- ================ -->
>       <!-- Protected area   -->
>       <!-- ================ -->
>       <map:match pattern="internet/espaceclient/protected">
>         <!-- first validate whether user has logged in -->
>         <map:act type="session-validator">
>           <map:parameter name="descriptor"
> value="descriptors/params.xml"/>
>           <map:parameter name="validate"
> value="identifiant,nom,prenom,id,titre"/>
>           <!-- generate protected content -->
>             <map:redirect-to session="true" 
> uri="test.bienvenue.info"/>
> <!--          <map:serialize/>-->  <!-- I tried with and without this
> serialize -->
>         </map:act>
>         <!-- something was wrong, redirect to login page -->
>         <map:redirect-to uri="login2"/>
>       </map:match>
> 
>       <!-- ========================================= -->
>       <!-- Logout link which invalidates the session -->
>       <!-- ========================================= -->
>       <map:match pattern="internet/espaceclient/do-logout">
>         <map:act type="session-invalidator">
>           <map:redirect-to uri="espaceclient.info"/>
>         </map:act>
>       </map:match>
> 
> 
> 
> 
> 
> > -----Message d'origine-----
> > De : Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
> > Envoye : mercredi 3 juillet 2002 17:59
> > A : [EMAIL PROTECTED]
> > Objet : RE: session...
> > 
> > 
> > > From: zze-STIENNE Nicolas FTRD/DMI/CAE
> > > 
> > > [bis: I indicated a false title]
> > > 
> > > Hi !!
> > > 
> > >  I reuse the Webapp sample "protected area".
> > > 
> > > Once the identification done, I arrived on the "protected 
> page". But
> > how
> > > could I do to go into another page without quiting the "protected
> > zone".
> > > 
> > > I mean : if there is a link on my "protected page" how 
> could I do to
> > > stay in a protected state ?
> > 
> > Have you seen sitemap?
> > 
> >       <!-- ================ -->
> >       <!-- Protected area   -->
> >       <!-- ================ -->
> > ...
> >         <!-- first validate whether user has logged in -->
> >         <map:act type="session-validator">
> >           <map:parameter name="descriptor"
> > value="context://protected//descriptors/params.xml"/>
> >           <map:parameter name="validate"
> > value="username,department_id,theme"/>
> >           <!-- generate protected content -->
> > ...
> > 
> > 
> > Vadim
> > 
> > 
> > > At the moment, as I go to another page, the data transmit by the
> > session
> > > (<session:get-attribute name="id"/>) are unavailable...
> > > 
> > > Thanks, Nicolas !!
> > 
> > 
> > 
> ---------------------------------------------------------------------
> > 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