You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joose Vettenranta <jo...@iki.fi> on 2003/10/28 18:08:54 UTC

Re: session tracking without cookies [SOLUTION?]

Hi,

because <map:redirect-to uri="host..." session="true" /> did not work, I
made add on to my authenticator XSP

I have like this:

   <map:match pattern="*.*.html">
    <map:act type="session-invalidator" />
    <map:act type="xsp-action" src="logic/check-login.xsp">
     <map:parameter name="id" value="{1}" />
     <map:parameter name="auth" value="{2}" />
     <map:redirect-to
uri="http://host/{session-attr:dir}/;jsessionid={session-attr:sid}"
session="true" />
    </map:act>
    <map:redirect-to uri="http://host/access-denied.html" />
   </map:match>

and in check-login.xsp I create
<xsp-session:set-attribute name="sid"><xsp-session:get-id
/></xsp-session:set-attribute>

And I use encodeURL to transform pages to support that.

At least this works, although redirect-to should support that by
default!

Using cocoon 2.1

- Joose

pe, 2003-10-24 kello 12:15, Joose Vettenranta kirjoitti:
> pe, 2003-10-24 kello 12:03, Joerg Heinicke kirjoitti:
> > <map:redirect-to uri="http://host/di/rec/tory" session="true"/>
> 
> I tried 
> 
> <map:redirect-to uri="/{session-attr:name}/" session="true" />
> 
> And it forwarded it to /joose/ and not to
> /joose/;JSESSIONID=gf08hf40ff4fw so it did not work.
> 
> > http://cocoon.apache.org/2.1/userdocs/concepts/redirection.html
> 
> this page says session should have value yes, but I tried that too and
> it did not work. I am using cocoon 2.0.4 so that might be the problem
> too?
> 
> - Joose
-- 
Joose Vettenranta <jo...@iki.fi>  GSM: 044 561 0270
* Always remember that you are unique.
                          Just like everyone else.*


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: session tracking without cookies [NO-SOLUTION?]

Posted by Joose Vettenranta <jo...@intertechnika.com>.
ke, 2003-10-29 kello 10:21, Joose Vettenranta kirjoitti:
> ti, 2003-10-28 kello 19:08, Joose Vettenranta kirjoitti:
> 
> Hi,
> 
> that solution does work, but ONLY if browser won't use cookies. So, I
> can't use <map:redirect-to uri="http://host/directory/" /> If browser
> won't have cookies.

Seems like I can't make it to work how I try it.

Seems like I have to make a new way of thinking of sessions. Maybe
generetion that directory with same id and auth string that I used with
authentication.. Like this:

http://host/{id}.{auth}/

Seems like that is only way to do it with absolute certainly.

- Joose

> And I have like this now:
> 
> > I have like this:
> > 
> >    <map:match pattern="*.*.html">
> >     <map:act type="session-invalidator" />
> >     <map:act type="xsp-action" src="logic/check-login.xsp">
> >      <map:parameter name="id" value="{1}" />
> >      <map:parameter name="auth" value="{2}" />
> >      <map:redirect-to
> > uri="http://host/{session-attr:dir}/"
> > session="true" />
> >     </map:act>
> >     <map:redirect-to uri="http://host/access-denied.html" />
> >    </map:match>
> 
> and I have like:
> 
> <map:pattern="{session-attr:dir}/**"<
>  <map:mount .... />
> </map:pattern>
> 
> - Joose
-- 
Joose Vettenranta, Intertechnika Oy
E-Mail: joose.vettenranta@intertechnika.com
WWW: http://www.intertechnika.com/
GSM: 044 561 0270


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: session tracking without cookies [NO-SOLUTION?]

Posted by Joose Vettenranta <jo...@iki.fi>.
ti, 2003-10-28 kello 19:08, Joose Vettenranta kirjoitti:

Hi,

that solution does work, but ONLY if browser won't use cookies. So, I
can't use <map:redirect-to uri="http://host/directory/" /> If browser
won't have cookies.

And I have like this now:

> I have like this:
> 
>    <map:match pattern="*.*.html">
>     <map:act type="session-invalidator" />
>     <map:act type="xsp-action" src="logic/check-login.xsp">
>      <map:parameter name="id" value="{1}" />
>      <map:parameter name="auth" value="{2}" />
>      <map:redirect-to
> uri="http://host/{session-attr:dir}/"
> session="true" />
>     </map:act>
>     <map:redirect-to uri="http://host/access-denied.html" />
>    </map:match>

and I have like:

<map:pattern="{session-attr:dir}/**"<
 <map:mount .... />
</map:pattern>

- Joose
-- 
Joose Vettenranta <jo...@iki.fi>  GSM: 044 561 0270
* Always remember that you are unique.
                          Just like everyone else.*


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org