> due that Apache::Session module itself, on which
> AddXSLParams::BasicSession is based on, does not save() automatically
> vars/keys when you store them (kept into an in-memory hash till you
> untie/save). But you have to do it explicitly yourself. At least this
> is what I needed to do before each HTTP redirect to keep my session
> status consistent between pages, after each session set_attribute()
> call:

BasicSession does seem to save the session variables between page 
requests, it is only between each process in the transformation pipeline 
that it appears to not save the the session data automatically.

> my $session_db;
> if( $session_db = tied(%Apache::AxKit::Plugin::BasicSession::session) )
> {
> $session_db->save;
> };
> 
> which actually forces the session to be re-read from the backend DB
> once you "go in from another page/step" (I guess re-tie the DB)

I tried adding the above code to the XSP transformation that gets done 
prior to the final stylesheet being applied, but it seemed to have no 
effect. What I tried was:

<xsp:logic>
        my $bs = nnew AxKit::XSP::BasicSession;
        $bs->set_attribute('userId', 'tomK');

        my $session_db;
        if( $session_db = 
tied(%Apache::AxKit::Plugin::BasicSession::session) )
        {
                $session_db->save;
        }
</xsp:logic>

And the final stylesheet still did not receive the correct value for 
'userId'. No change :(

-- 
Tom David Kirkpatrick
Virus Bulletin Web Developer, Virus Bulletin

Tel: +44 1235 555139
Web: www.virusbtn.com


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to