It may be that the local <SessionId> executes too early in
the chain to have the desired effect.

A feature of the Context element is that any attribute that
doesn't have an explicit setter get stored in a "properties"
hashtable in the Context.  Thus, you could add noCookies="true"
to the Context, i.e.

    <Context ... noCookies="true" ...>

and a "noCookies" property would be set on that Context.
I believe you could create a MySessionId interceptor that
extends SessionId.  It would override the beforeBody() method
and would check the "noCookie" property on the context.  If
found and is "true", then skip calling super.beforeBody(...)
so the normal handling is skipped and the cookie isn't added.
Let me know if a modification like this would be acceptable.

Cheers,
Larry

> -----Original Message-----
> From: Christian Kurze [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, July 16, 2002 8:53 AM
> To: Tomcat Users List
> Subject: RE: disabling cookies, Tomcat 3.3.1 Final
> 
> 
> THanks, but it doesn't work. I set     <SessionId cookiesFirst="false"
> noCookies="true" /> in the <ContextManager>. But the browsers 
> still use
> cookies. I tried to put <SessionId> in the <server>-section, without
> success.
> I'm not allowed to modify the whole server.xml. But I can modify my
> <context>-section. Please tell me about your other solution, 
> maybe I can
> persuade the admins to change the whole server.xml.
> 
> thx in advance
> Christian
> 
> > -----Original Message-----
> > From: Larry Isaacs [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, July 16, 2002 2:27 PM
> > To: 'Tomcat Users List'
> > Subject: RE: disabling cookies, Tomcat 3.3.1 Final
> >
> >
> > What you are looking for isn't directly supported in Tomcat 3.3.1.
> > Are you able permitted to use customized version of Tomcat 3.3.1?
> > If not, you could try setting noCookies="true" on the global
> > <SessionId> and setting noCookies="false" on the local <SessionId>
> > for Contexts you want to use cookies.  It looks like the
> > cookiesFirst setting on the global <SessionId> will apply to all.
> >
> > If you can use a customized (i.e. replace SessionId with
> > your modified version) Tomcat 3.3.1, then a better solution
> > should be possible.  Let me know if you want to try this
> > path.
> >
> > Cheers,
> > Larry
> >
> > > -----Original Message-----
> > > From: Christian Kurze [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, July 16, 2002 7:21 AM
> > > To: Tomcat Users List
> > > Subject: disabling cookies, Tomcat 3.3.1 Final
> > >
> > >
> > > HI,
> > >
> > > I want to use URL rewriting for session tracking by default,
> > > that means,
> > > even if the user has activated cookies in his/her browser,
> > > the url should be
> > > encoded via response.encodeURL(). There is a module <SessionId
> > > cookiesFirst="false" noCookies="true" /> to use in the
> > > server.xml. But I
> > > don't know where to place it, because I want to deactivate
> > > cookies in only
> > > one context. The others should use cookies by default. I tried the
> > > following, but it didn't work for me:
> > >         <Context path="/onlinestore"
> > >           docBase="D:\Java\onlinestore\defaultroot"
> > >           crossContext="true"
> > >           workdir="D:\Java\onlinestore\defaultroot"
> > >           debug="0"
> > >           reloadable="true">
> > >           <SessionId cookiesFirst="false" noCookies="true" />
> > >         </Context>
> > > In 4.0 there is an attribute for Context, cookies="false",
> > > but I HAVE TO
> > > work with 3.3.1 final.
> > > Is it possible to deactivate cookies in the web.xml file?
> > >
> > > Any help appreciated.
> > > Thanks
> > >
> > > Christian
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > <mailto:tomcat-user-> [EMAIL PROTECTED]>
> > > For
> > > additional commands,
> > > e-mail: <mailto:[EMAIL PROTECTED]>
> > >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:tomcat-user-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 

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

Reply via email to