You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by David Hénot <he...@sens3d.com> on 2001/09/14 18:34:40 UTC
Problem with sessions on Cocoon 2
Hello,
I'm having a problem trying to use sessions (precisely the session validator
action) with cocoon 2.
I tried to send a mail to the cocoon-users ML, but got no replies. So I
upgraded to the beta2 (I started with beta1) and to a cvs snapshot (dated
09/12/2001) with no success, and as it looks (in my point of view) like a bug
in cocoon, I decided to try cocoon-dev ... I would appreciate any help and if
it's a bug in cocoon I will help to fix it.
I attached the mail sent to cocoon-users, so you can have all the details,
but with the new logs generated by the cvs snapshot, the problem is quite
clear :
------ cocoon.log (some infos cut for readability) ------
(...)
Thread-56/DatabaseAuthenticatorAction: DBAUTH: authorized successfully
Thread-56/DatabaseAuthenticatorAction: DBAUTH: session created
Thread-56/DatabaseAuthenticatorAction: DBAUTH: propagating param login=henot
Thread-56/DatabaseAuthenticatorAction: DBAUTH: propagating param name=Hénot
David
(The session is created by DbAuthenticatorAction ...)
Thread-56/DefaultPool: Returning a
org.apache.avalon.excalibur.datasource.JdbcConnection to the pool
Thread-56/sitemap_xmap: Action db-authenticator
Thread-56/sitemap_xmap: Sitemap: session='true', redirecting to ''
Thread-56/Cocoon: DEBUGGING INFORMATION:
REQUEST: /sens3d/test/
CONTEXT PATH: /sens3d
SERVLET PATH: /test/
PATH INFO: null
REMOTE HOST: www.sens3d.com
REMOTE ADDRESS: 80.65.225.100
REMOTE USER: null
REQUEST SESSION ID: a8u8scx0d1
REQUEST PREFERRED LOCALE: en
SERVER HOST: www.sens3d.com
SERVER PORT: 80
METHOD: GET
CONTENT LENGTH: -1
PROTOCOL: HTTP/1.1
SCHEME: http
AUTH TYPE: null
CURRENT ACTIVE REQUESTS: 2
MAXIMUM ACTIVE REQUESTS: 2
REQUEST PARAMETERS:
SESSION ATTRIBUTES:
PARAM: 'name' VALUE: 'Hénot David'
PARAM: 'login' VALUE: 'henot'
(So the session is present, or so it seems to me .... but a few lines after I
see this : )
Thread-56/SessionValidatorAction: SESSIONVALIDATOR: validating parameters
from given constraint-set is-logged-in
Thread-56/SessionValidatorAction: SESSIONVALIDATOR: given set is-logged-in
contains 2 rules
Thread-56/AbstractValidatorAction: VALIDATOR: validating parameter: login
Thread-56/AbstractValidatorAction: VALIDATOR: validating string parameter
login (encoded in a string: false)
Thread-56/AbstractValidatorAction: VALIDATOR: validating parameter: name
Thread-56/AbstractValidatorAction: VALIDATOR: validating string parameter
name (encoded in a string: false)
Thread-56/SessionValidatorAction: SESSIONVALIDATOR: all session params
validated
(How could these parameters be anything else than strings ?)
------------------
And, btw, Cocoon 2 is really great (or at least it will be when I'll manage
to use sessions :)) !
David
Re: Problem with sessions on Cocoon 2
Posted by Martin Man <Ma...@seznam.cz>.
On Fri, Sep 14, 2001 at 06:34:40PM +0200, David Hénot wrote:
> Hello,
>
> I'm having a problem trying to use sessions (precisely the session validator
> action) with cocoon 2.
> I tried to send a mail to the cocoon-users ML, but got no replies. So I
> upgraded to the beta2 (I started with beta1) and to a cvs snapshot (dated
> 09/12/2001) with no success, and as it looks (in my point of view) like a bug
> in cocoon, I decided to try cocoon-dev ... I would appreciate any help and if
> it's a bug in cocoon I will help to fix it.
>
> I attached the mail sent to cocoon-users, so you can have all the details,
> but with the new logs generated by the cvs snapshot, the problem is quite
> clear :
>
> ------ cocoon.log (some infos cut for readability) ------
> [snip]
>
> Thread-56/SessionValidatorAction: SESSIONVALIDATOR: validating parameters
> from given constraint-set is-logged-in
> Thread-56/SessionValidatorAction: SESSIONVALIDATOR: given set is-logged-in
> contains 2 rules
> Thread-56/AbstractValidatorAction: VALIDATOR: validating parameter: login
> Thread-56/AbstractValidatorAction: VALIDATOR: validating string parameter
> login (encoded in a string: false)
> Thread-56/AbstractValidatorAction: VALIDATOR: validating parameter: name
> Thread-56/AbstractValidatorAction: VALIDATOR: validating string parameter
> name (encoded in a string: false)
hmm, found that it's really a small cosmetic bug, "encoded in a string" is
of course wrong here, but it does not have any impact on actual validation
process, ..., for strings this attribute is ignored... it makes sense only for
other datatypes, e.g., longs and floats which can be encoded as a string when
taken from request or as native java.lang.Long, java.lang.Float when stored in
session, ..., quite confusing isn't it :-))
> Thread-56/SessionValidatorAction: SESSIONVALIDATOR: all session params
> validated
>
> (How could these parameters be anything else than strings ?)
>
see above
> David
rgds,
martin
--
-----------------------------------------------------------------------
"Only dead fish swims with a stream" Malcolm Muggeridge
gpg_key_available: http://globales.cz/~mman/martin.man.gpg
gpg_key_fingerprint: 2CC0 4AF6 92DA 5CBF 5F09 7BCB 6202 7024 6E06 0223
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: Problem with sessions on Cocoon 2
Posted by Christian Haul <ha...@dvs1.informatik.tu-darmstadt.de>.
David,
after reading the sources and the output you provided I get the
impression that both actions do indeed work correctly i.e. the line
"SESSIONVALIDATOR: all session params validated" is only printed if
all params were validated _successfully_
Could you please be more specific what makes you believe that it
doesn't work as advertised? Wait...
On 14.Sep.2001 -- 06:34 PM, David H?not wrote:
> 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)
What are you trying here? Please post the relevant bits of your XSP /
XSL. To use a session attribute you need the session taglib and use
<session:get-attribute name="login"/> (Or do it manually with java.)
Chris.
--
C h r i s t i a n H a u l
haul@informatik.tu-darmstadt.de
fingerprint: 99B0 1D9D 7919 644A 4837 7D73 FEF9 6856 335A 9E08
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org