sessions with cocoon

2002-05-29 Thread Christoph Stocker

hi all!

i read the cocoon session-handling manuals - but ...

what's the best way to implement sessionhandling or sessiontracking
in cocoon. 

can someone give a HowTo to implement this.

THANKS!
greetings, chris


-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




sessions in cocoon

2002-05-29 Thread Christoph Stocker

hi!

can someone give an example to implement session-handling or tracking
in cocoon.

greetings, chris


-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: sessions in cocoon

2002-05-29 Thread Ivan Luzyanin

On óÒÄ, 2002-05-29 at 16:35, Christoph Stocker wrote:
 hi!
 
 can someone give an example to implement session-handling or tracking
 in cocoon.
 
 greetings, chris
 
there are some small examples in Cocoon API documentation for session
handing and tracking (i.e. SessionIsValidAction, SessionValidatorAction,
SessionStateAction)

P.S. You can find Cocoon API documentation in distribution package.


-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: sessions in cocoon

2002-05-29 Thread Atul Gulve

If you want to access session object then you should do it following way in 
cocoon.

In your xsp file you can access the session.
xsp:logic
org.apache.cocoon.environment.http.HttpSession session = 
(org.apache.cocoon.environment.http.HttpSession)request.getSession();

Object foo = session.getAttribute(foobar);
.
.
.
.
/xsp:logic


From: Christoph Stocker [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Subject: sessions in cocoon
Date: Wed, 29 May 2002 15:35:21 +0200

hi!

can someone give an example to implement session-handling or tracking
in cocoon.

greetings, chris


-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



_
Chat with friends online, try MSN Messenger: http://messenger.msn.com


-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: sessions in cocoon

2002-05-29 Thread Ivan Luzyanin

On óÒÄ, 2002-05-29 at 17:05, Atul Gulve wrote:
 If you want to access session object then you should do it following way in 
 cocoon.
 
 In your xsp file you can access the session.
 xsp:logic
 org.apache.cocoon.environment.http.HttpSession session = 
 (org.apache.cocoon.environment.http.HttpSession)request.getSession();
 
 Object foo = session.getAttribute(foobar);
 .
 .
 .
 .
 /xsp:logic

Actually is no need to get session object from request object. Session
object is ready to use from XSP's by using session variable.

xsp:page ...
doc
xsp:logic
Object foo = session.getAttribute(foobar);
/xsp:logic
/doc
/xsp:page

Ivan.


-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Problem with sessions on Cocoon 2

2001-09-07 Thread David Hénot

Hello,
I'm trying to use Cocoon 2 with SessionValidatorAction and 
DatabaseAuthenticatorAction to handle user authentication, but I'm unable to 
get the session validator to see the session variables set by the database 
authenticator. Searching mail and groups archives didn't help much ...

Versions : Cocoon 2.0b1, Tomcat 3.2.3, Apache 1.3.19 (with mod_jk)

--- in sitemap.xmap ---
   map:match pattern=
map:redirect-to session=true uri=welcome/
   /map:match

   map:match pattern=welcome*
map:act type=session-validator
 map:parameter name=descriptor value=test/resources/session.xml/
 map:parameter name=validate-set value=is-logged-in/
/map:act
map:generate src=sens3d/plan.xml/
map:transform src=stylesheets/html.xsl/
map:serialize/
   /map:match

   map:match pattern=do-login
map:act type=form-validator
 map:parameter name=descriptor value=test/resources/session.xml/
 map:parameter name=validate-set value=login-form/
 map:act type=db-authenticator
  map:parameter name=descriptor value=test/resources/login.xml/
  map:redirect-to session=true uri=/
 /map:act
/map:act
   /map:match


When I try to log in (do-login), I get this in the log file :

   DBAUTH: authorized successfully
   DBAUTH: session created
   DBAUTH: propagating param login=henot
   DBAUTH: propagating param name=Hénot David
   Action ((Action)this.actions.select( db-authenticator )).act
   Sitemap: session='true', redirecting to ''
   redirect: entering session mode
   redirect: session mode completed, id = lsbkkpjd81
   Sending redirect to ';jsessionid=lsbkkpjd81'

So everything seems OK but later when the session validator is called :

   SESSIONVALIDATOR: validating parameters from given constraint-set 
is-logged-in
   SESSIONVALIDATOR: given set is-logged-in contains 2 rules
   VALIDATOR: validating parameter: login
   VALIDATOR: validating string parameter login (encoded in a string: false)
   VALIDATOR: validating parameter: name
   VALIDATOR: validating string parameter name (encoded in a string: false)
   SESSIONVALIDATOR: all session params validated

It looks like the validator didn't see anything in the session, and in fact I 
can't use the name variable from the xsl stylesheet (always undefined 
although I put a xsl:param name=name/ after the xsl:stylesheet)

Any help *much* appreciated !

-- 
David Hénot

-
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]