tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeff Rhines" <jrhi...@email.com>
Subject RE: Newbie - Sessions without cookies?
Date Thu, 25 May 2000 00:54:05 GMT
Unfortunately, the following doesn't work for me.  I'm Running Redhat 6.1,
Apache 1.3.9, and Tomcat 3.1.  Where would i start looking to figure out
what's going on?

Thanks,
Jeff

To: tomcat-user@jakarta.apache.org
Subject: Re: P: session tracking * encodeURL
From: Jason Rumney <jrumney@ipo.att.com>
Date: 18 May 2000 14:38:58 +0100

Johannes_Lorenz@mn.man.de writes:

> Hello,
>
> i use the methode encodeURL for rewriting URLs. It's working, if i use
tomcat
> standalone, but it doesn't work in the apache-tomcat environment.
>
> Has anybody else seen this effect?

The problem is that Apache does not recognize the semicolon that
separates the session id from the rest of the URL as being anything
special, so rules based on file extension for example, won't match
properly.

> Is there a workaround (i won't use cookies)?

I have the following rewrite rule in my apache config to fix this:


  <IfModule mod_rewrite.c>
      RewriteEngine     on
      # Force URLs with a jsessionid to go to Tomcat. Necessary because
      # Apache doesn't recognise that the semi-colon is special.
      RewriteRule       ^(/.*;jsessionid=.*)$   $1 [T=jserv-servlet]
  </IfModule>


> -----Original Message-----
> From: Jeff Rhines [mailto:jrhines@email.com]
> Sent: Wednesday, May 24, 2000 5:05 PM
> To: tomcat-user@jakarta.apache.org
> Subject: RE: Newbie - Sessions without cookies?
>
>
> At the risk of posting too often, i thought i'd say the
> URLEncode link in
> the Sessions example
> (http://localhost.localdomain/examples/servlet/SessionExample
> when Tomcat is
> installed according to the docs) does not seem to be working either.
> Checked the code, and encodeURL is being called.  Does anyone
> have a patch
> in production?
>
> Regards,
> Jeff
>
> > -----Original Message-----
> > From: Alexander B Kogan [mailto:kogan@ptc.com]
> > Sent: Wednesday, May 24, 2000 4:56 PM
> > To: tomcat-user@jakarta.apache.org
> > Subject: Re: Newbie - Sessions without cookies?
> >
> >
> > Jeff,
> >
> > I know nothing about "sessions/carts" example. What's that?
> >
> > But, you're right - if you turn off cookies it "must" work.
> >
> > from servlet API 2.2 javadoc:
> >
> >   For robust session tracking, all URLs emitted by a servlet
> > should be
> >   run through this method [encodeURL]. Otherwise, URL
> > rewriting cannot
> >   be used with browsers which do not support cookies.
> >
> >
> > Best,
> >
> >
> >
> > Jeff Rhines wrote:
> > >
> > > Alexander,
> > >
> > > Thanks for the information.  That seems to be exactly what
> > i need.  However,
> > > i believe i have confirmed that it's busted.  Just to
> > sanity check with the
> > > list however, if i turn cookies off when using the
> > "sessions/carts" example,
> > > it should still work, is that correct?
> > >
> > > Jeff
> > >
> >
> > --
> > _________________________________________________________
> > Alexander Kogan    Parametric Technology Corporation
> > kogan@ptc.com      128 Technology Drive, Waltham MA 02453
> >
> > --------------------------------------------------------------
> > ------------
> > To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, email: tomcat-user-help@jakarta.apache.org
> >
> >
> >
>
>
> --------------------------------------------------------------
> ------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
>
>
>


Mime
View raw message