cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Romayev <roma...@yahoo.com>
Subject RE: Session context in Cocoon.
Date Tue, 13 May 2003 13:18:52 GMT
Hi Irina,

Here is what the documentation says:

"The session action is responsible for creating and
terminating a session. It is controlled by a sitemap
parameter named "action". This parameter can have the
values "create" and "terminate". If no parameter is
set, it defaults to "create". 

The action either creates a new session immediately
(if not already available), or terminates it (if
available). "

I would have thought the session should be available,
but judging by the error message you get, it's
obviously not.

Second thought is, looking at your code, you may want
to take a look at Cocoon's authentication framework,
as it does exactly what you're trying to do in your
example.

-Alex


--- Kogan Irina <Irina.Kogan@mchp.siemens.de> wrote:
> > Could you post your sitemap fragment?
> 
> Sitemap:
> 
> <map:generate src="docs/session-context.xml"/>
> 			 
> <map:transform
> src="stylesheets/insert-session-directives.xsl">
> 	<map:parameter name="use-request-parameters"
> value="true"/> 
> </map:transform>
> <map:transform type="session"/>  
> 
> 
> File docs/session-context.xml:
> 
> <?xml version="1.0" encoding="ISO-8859-1"?>
> 
> <user/>
> 
> 
> File stylesheets/insert-session-directives.xsl:
> 
> <?xml version="1.0"?>
> 
> <xsl:stylesheet version="1.0" 
>                
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> 
>                
>
xmlns:session="http://cocoon.apache.org/session/1.0">
> 
> <xsl:param name="name"/>
> <xsl:param name="password"/>
> 
> <xsl:template match="user">
> 	<resource
>
xmlns:session="http://cocoon.apache.org/session/1.0">
> 		 <session:createcontext name="trackdemo"/>
> 		 <!-- build context data -->
> 		 <session:setxml context="trackdemo" path="/">
> 		   <context>
> 		     <user>
> 		         <name><xsl:value-of
> select="$name"/></name>
> 		         <password><xsl:value-of
> select="$password"/></password>
> 		     </user>
> 		   </context>
> 		 </session:setxml>
> 		 
> 		 <session:getxml context="trackdemo" path="/"/>
> 	</resource>
> </xsl:template>
>   
> </xsl:stylesheet>
> 
> Thank you very much!  I really appreciate your help!
> 
> Irina.
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail:
> cocoon-users-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message