You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Hubert NEOtyk Iwaniuk <hu...@office.ferienwelt.com.pl> on 2001/11/28 13:32:29 UTC

[c2]: actions

Hi all,

	what i want to do is:
	on each page of my site login (user, pwd) is present.
	i want it to anable user login on every page.
	for now it is ok.

	i want login if passed or failed, show page from witch it was called and give information to user if he is logged in or not.
	and that last thing, returning to page from witch user logged,
	is my trouble, i don't know how to build site map to make this work.

Thanks in advance,
	hubert.

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

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: [c2]: actions

Posted by Nuno José Pires dos Santos <ns...@electroplus.pt>.
I've implemented this one (similar)
 
<map:match pattern="**.html"> 
   
    <map:act type="session-validate"> <!-- is the user logged in? -->
      <map:parameter name="descriptor"
value="context://descriptors/users.xml"/>
      <map:parameter name="validate" value="login,passwd"/>
           
      <map:generate src="your generator"/>
      <map:transform src="style/portal-style.xsl">
        <map:parameter name="last-url" value="{../1}.html"/>
      </map:transform>
      <map:serialize/>
    </map:act>
    <map:act type="form-validate"> <!-- Is the login conformant? -->
      <map:parameter name="descriptor"
value="context://descriptors/users.xml"/>
      <map:parameter name="validate" value="login,passwd"/>
      <map:act type="db-authenticator"> <!-- does the login exists? -->
        <map:parameter name="descriptor"
value="context://descriptors/users.xml"/>
        <map:redirect-to uri="{../../1}.html"/>
      </map:act>
      <map:redirect-to uri="index.html"/>
    </map:act>
    
   <map:generate src="your generator"/>	
   <map:transform src="style/portal-style.xsl">
        <map:parameter name="last-url" value="{1}.html"/>
    </map:transform>
    <map:serialize/>
    
   </map:match>
   

it works for me.

Ps: the form action is empty, as it just go to the active page

-----Mensagem original-----
De: Hubert NEOtyk Iwaniuk [mailto:huberti@office.ferienwelt.com.pl] 
Enviada: quarta-feira, 28 de Novembro de 2001 12:32
Para: cocoon-users@xml.apache.org
Assunto: [c2]: actions

Hi all,

	what i want to do is:
	on each page of my site login (user, pwd) is present.
	i want it to anable user login on every page.
	for now it is ok.

	i want login if passed or failed, show page from witch it was
called and give information to user if he is logged in or not.
	and that last thing, returning to page from witch user logged,
	is my trouble, i don't know how to build site map to make this
work.

Thanks in advance,
	hubert.

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

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


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

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>