Does your browser allow session-cookies? If not or may you have switched session-cookies off at your browser, then you need use URL rewriting see response.encodeURL(), respone.redirectEncodeURL() for more info ----- Originalnachricht ----- Von: David Hénot <[EMAIL PROTECTED]> Datum: Freitag, September 14, 2001 6:34 pm Betreff: 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=henotThread-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-5Thread-5login (encoded in a string: false) > Thread-5Thread-5name (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
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]>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
begin:vcard n:Huber;Bernhard fn:Bernhard Huber version:2.1 email;internet:[EMAIL PROTECTED] end:vcard
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]