You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Simeon Walker <si...@sbs.bangor.ac.uk> on 2002/07/08 15:42:32 UTC

Strange problems with sunrise components

Hi,

recently I wrote about how I was always re-directed to the login
page when trying to access a page protected by the sunRise-auth
action. I have found out some more and it's just getting weirder...

Here's what happens:

1. I try to access the protected page and get redirected to the
    login form.
2. I login ok and my end up on my 'logged in' status page, the
    url of this page has the jsessionid appended AND I was prompted
    to accept a cookie, which I did.
3. If I try to access the protected url again I am back at the
    login form BUT if I paste the jsessionid on the end then I
    can view the page!

The weird things:

1. I have the EncodeURL transormer called just before the html
    serializer but nothing seems to get encoded. I am right in
    thinking that this should append the jsessionid to all the
    href links in my page aren't I?
2. I'm obviously logged in otherwise pasting the jsessionid wouldn't
    work would it?
3. A cookie is set but it doesn't seemed to be used. How can I
    know if this cookie is ever read?

It seems to me that for whatever reason the sunrise components are
failing to identify the session that I am already logged into
either because the url rewriting isn't happening or the cookie
is never read back.

It gets weirder: I've been talking about Netscape 4.7 and Mozilla 1
under Linux. If I use Konqeror (the KDE web browser) it works!
i.e. when accessing a protected url I see the page and not the
login form.

Finally, there are some other interactions. When trying to
run the sunshine transformer:

<map:match pattern="auth/loggedin">
   <map:act type="sunRise-auth">
     <map:parameter name="handler" value="sbs-handler"/>
     <!-- ** This next line won't work with the transformer ** -->
     <!-- <map:generate src="cocoon://dept/auth/loggedin"/> -->
     <!-- ** But this line will ** -->
     <map:generate src="site/auth/loggedin.xsp" type="serverpages"/>
     <map:transform type="sunShine"/>
     <map:call resource="to-html"/>
   </map:act>
</map:match>

i.e. when the xml in the pipeline has come from a sub-sitemap
the transformer fails. But why? The transformer is not called
from the sub-sitemap and there are no sunrise components in
any sub-sitemap.

I guess these components aren't in widespread use yet so
maybe nobody else has had problems but I would appreciate
and suggestions (and my thanks the Mattew and Carsten for
their previous replies on this).

Regards,
Simeon


-- 
Simeon Walker,                      email: simeon@sbs.bangor.ac.uk
School of Biological Sciences,      phone: +44 (0)1248 383702
University of Wales, Bangor,        fax: +44 (0)1248 382569
Gwynedd, LL57 2UW, UK.              www: http://biology.bangor.ac.uk/


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>