You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Charles Baker <ra...@yahoo.com> on 2001/06/02 11:31:41 UTC

URL encoding and ';' rather than '?'

I've been browsing the archives but still haven't seen
what I'm looking for. Why does Tomcat use ';' rather
than '?' when an URL gets encoded?

Example:

URL = "http://my.domain/some_form.htm";
response.sendRedirect(response.encodeRedirectURL(URL));

Yeilds an url like this:
http://my.domain/some_form.htm;jsessionid=lidfano10

and a 404 not found error.

I use JRun at work because my company is predjudiced
against free software, and it uses the '?' to separate
the url and the query string which I thought was
standard. BTW, I'm using Tomcat 3.2.1 and Apache
1.3.14 on Mandrake 7.2. I saw some workarounds posted
to the list, but I'm curious as to why Tomcat behaves
this way. Does either 3.2.2, 3.3 or 4.0 do things
differently? I know 4.0 is the cutting or perhaps
bleeding edge, but is 3.3  mostly stable though it
hasn't been through beta testing yet?


=====
-
rascharles@yahoo.com
Hacking is a "Good Thing!"
See http://www.tuxedo.org/~esr/faqs/hacker-howto.html

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Re: URL encoding and ';' rather than '?'

Posted by Charles Baker <ra...@yahoo.com>.
I must admit that I am far from an expert on this
subject, but I'm trying to learn as much as I can as
quickly as I can. At any rate, my reading to date has
suggested that be using the encodeURL and
encodeRedirectURL methods one can maintain session
state across static pages as well as across servlet
generated pages and JSPs. Is the encoding not needed?

--- David Crooke <da...@convio.com> wrote:
> The semicolon approach is what most of the "proper"
> commercial appservers run
> (Dynamo, Websphere, etc.) and is superior in many
> ways - since this is not a
> significant part of the URL per the HTTP standard,
> the browser will ignore it as
> part of the servlet name. This allows you to
> "pre-rewrite" base URL's for
> servlets, and then add the querystring later, or use
> them in METHOD=GET forms
> (if you have an ACTION with a querystring, it gets
> blown away and replaced by
> the form arguments). This has been a bit of a
> headache for us with JServ (which
> uses a querystring arg just like JRun)
> 
> It sounds like the problem here is that the URL
> you're presenting is not being
> served by Tomcat and should not be rewritten in the
> first place.
> 
> Cheers
> Dave
> 
> Charles Baker wrote:
> 
> > Thanks. I read the bug report you listed below.
> I'm
> > still not certain from what is says that this has
> been
> > fixed in 3.2.2 or later. Does anyone know? I guess
> I
> > can upgrade since this is just my personal dev box
> and
> > see.
> >
> > --- Peter Hrastnik <pe...@1012surf.net> wrote:
> > > It's a know bug. It is listed at the Apache bug
> > > database having the bug id
> > > 1388. You can find more information here:
> > >
> >
>
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1388
> > >
> > > Bye,
> > >       Peter.
> > >
> > > --
> > > Mag. Peter Hrastnik
> > > tele.ring Telekom Service GmbH
> > > A-1030 Wien, Hainburgerstr. 33
> > > Tel.: +43/1/931012/3277, Mobil: +43/650/6503277
> > >
> > >
> > >
> > > On Sat, 2 Jun 2001, Charles Baker wrote:
> > >
> > > > I've been browsing the archives but still
> haven't
> > > seen
> > > > what I'm looking for. Why does Tomcat use ';'
> > > rather
> > > > than '?' when an URL gets encoded?
> > > >
> > > > Example:
> > > >
> > > > URL = "http://my.domain/some_form.htm";
> > > >
> > >
> >
>
response.sendRedirect(response.encodeRedirectURL(URL));
> > > >
> > > > Yeilds an url like this:
> > > >
> > >
> http://my.domain/some_form.htm;jsessionid=lidfano10
> > > >
> > > > and a 404 not found error.
> > > >
> > > > I use JRun at work because my company is
> > > predjudiced
> > > > against free software, and it uses the '?' to
> > > separate
> > > > the url and the query string which I thought
> was
> > > > standard. 

<<SNIP>> 


=====
-
rascharles@yahoo.com
Hacking is a "Good Thing!"
See http://www.tuxedo.org/~esr/faqs/hacker-howto.html

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Re: URL encoding and ';' rather than '?'

Posted by David Crooke <da...@convio.com>.
The semicolon approach is what most of the "proper" commercial appservers run
(Dynamo, Websphere, etc.) and is superior in many ways - since this is not a
significant part of the URL per the HTTP standard, the browser will ignore it as
part of the servlet name. This allows you to "pre-rewrite" base URL's for
servlets, and then add the querystring later, or use them in METHOD=GET forms
(if you have an ACTION with a querystring, it gets blown away and replaced by
the form arguments). This has been a bit of a headache for us with JServ (which
uses a querystring arg just like JRun)

It sounds like the problem here is that the URL you're presenting is not being
served by Tomcat and should not be rewritten in the first place.

Cheers
Dave

Charles Baker wrote:

> Thanks. I read the bug report you listed below. I'm
> still not certain from what is says that this has been
> fixed in 3.2.2 or later. Does anyone know? I guess I
> can upgrade since this is just my personal dev box and
> see.
>
> --- Peter Hrastnik <pe...@1012surf.net> wrote:
> > It's a know bug. It is listed at the Apache bug
> > database having the bug id
> > 1388. You can find more information here:
> >
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1388
> >
> > Bye,
> >       Peter.
> >
> > --
> > Mag. Peter Hrastnik
> > tele.ring Telekom Service GmbH
> > A-1030 Wien, Hainburgerstr. 33
> > Tel.: +43/1/931012/3277, Mobil: +43/650/6503277
> >
> >
> >
> > On Sat, 2 Jun 2001, Charles Baker wrote:
> >
> > > I've been browsing the archives but still haven't
> > seen
> > > what I'm looking for. Why does Tomcat use ';'
> > rather
> > > than '?' when an URL gets encoded?
> > >
> > > Example:
> > >
> > > URL = "http://my.domain/some_form.htm";
> > >
> >
> response.sendRedirect(response.encodeRedirectURL(URL));
> > >
> > > Yeilds an url like this:
> > >
> > http://my.domain/some_form.htm;jsessionid=lidfano10
> > >
> > > and a 404 not found error.
> > >
> > > I use JRun at work because my company is
> > predjudiced
> > > against free software, and it uses the '?' to
> > separate
> > > the url and the query string which I thought was
> > > standard. BTW, I'm using Tomcat 3.2.1 and Apache
> > > 1.3.14 on Mandrake 7.2. I saw some workarounds
> > posted
> > > to the list, but I'm curious as to why Tomcat
> > behaves
> > > this way. Does either 3.2.2, 3.3 or 4.0 do things
> > > differently? I know 4.0 is the cutting or perhaps
> > > bleeding edge, but is 3.3  mostly stable though it
> > > hasn't been through beta testing yet?
> > >
> > >
> > > =====
> > > -
> > > rascharles@yahoo.com
> > > Hacking is a "Good Thing!"
> > > See
> > http://www.tuxedo.org/~esr/faqs/hacker-howto.html
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Get personalized email addresses from Yahoo! Mail
> > - only $35
> > > a year!  http://personal.mail.yahoo.com/
> > >
> >
>
> =====
> -
> rascharles@yahoo.com
> Hacking is a "Good Thing!"
> See http://www.tuxedo.org/~esr/faqs/hacker-howto.html
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/


Re: URL encoding and ';' rather than '?'

Posted by Peter Hrastnik <pe...@1012surf.net>.
I checked mod_jk of the nightly build of 2001-05-17 and it wasn't
fixed in this version.

Bye,
	Peter.


On Sat, 2 Jun 2001, Charles Baker wrote:

> Thanks. I read the bug report you listed below. I'm
> still not certain from what is says that this has been
> fixed in 3.2.2 or later. Does anyone know? I guess I
> can upgrade since this is just my personal dev box and
> see.
>
> --- Peter Hrastnik <pe...@1012surf.net> wrote:
> > It's a know bug. It is listed at the Apache bug
> > database having the bug id
> > 1388. You can find more information here:
> >
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1388
> >
> > Bye,
> > 	Peter.
> >
> > --
> > Mag. Peter Hrastnik
> > tele.ring Telekom Service GmbH
> > A-1030 Wien, Hainburgerstr. 33
> > Tel.: +43/1/931012/3277, Mobil: +43/650/6503277
> >
> >
> >
> > On Sat, 2 Jun 2001, Charles Baker wrote:
> >
> > > I've been browsing the archives but still haven't
> > seen
> > > what I'm looking for. Why does Tomcat use ';'
> > rather
> > > than '?' when an URL gets encoded?
> > >
> > > Example:
> > >
> > > URL = "http://my.domain/some_form.htm";
> > >
> >
> response.sendRedirect(response.encodeRedirectURL(URL));
> > >
> > > Yeilds an url like this:
> > >
> > http://my.domain/some_form.htm;jsessionid=lidfano10
> > >
> > > and a 404 not found error.
> > >
> > > I use JRun at work because my company is
> > predjudiced
> > > against free software, and it uses the '?' to
> > separate
> > > the url and the query string which I thought was
> > > standard. BTW, I'm using Tomcat 3.2.1 and Apache
> > > 1.3.14 on Mandrake 7.2. I saw some workarounds
> > posted
> > > to the list, but I'm curious as to why Tomcat
> > behaves
> > > this way. Does either 3.2.2, 3.3 or 4.0 do things
> > > differently? I know 4.0 is the cutting or perhaps
> > > bleeding edge, but is 3.3  mostly stable though it
> > > hasn't been through beta testing yet?
> > >
> > >
> > > =====
> > > -
> > > rascharles@yahoo.com
> > > Hacking is a "Good Thing!"
> > > See
> > http://www.tuxedo.org/~esr/faqs/hacker-howto.html
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Get personalized email addresses from Yahoo! Mail
> > - only $35
> > > a year!  http://personal.mail.yahoo.com/
> > >
> >
>
>
> =====
> -
> rascharles@yahoo.com
> Hacking is a "Good Thing!"
> See http://www.tuxedo.org/~esr/faqs/hacker-howto.html
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
>


Re: URL encoding and ';' rather than '?'

Posted by Charles Baker <ra...@yahoo.com>.
Thanks. I read the bug report you listed below. I'm
still not certain from what is says that this has been
fixed in 3.2.2 or later. Does anyone know? I guess I
can upgrade since this is just my personal dev box and
see.

--- Peter Hrastnik <pe...@1012surf.net> wrote:
> It's a know bug. It is listed at the Apache bug
> database having the bug id
> 1388. You can find more information here:
>
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1388
> 
> Bye,
> 	Peter.
> 
> -- 
> Mag. Peter Hrastnik
> tele.ring Telekom Service GmbH
> A-1030 Wien, Hainburgerstr. 33
> Tel.: +43/1/931012/3277, Mobil: +43/650/6503277
> 
> 
> 
> On Sat, 2 Jun 2001, Charles Baker wrote:
> 
> > I've been browsing the archives but still haven't
> seen
> > what I'm looking for. Why does Tomcat use ';'
> rather
> > than '?' when an URL gets encoded?
> >
> > Example:
> >
> > URL = "http://my.domain/some_form.htm";
> >
>
response.sendRedirect(response.encodeRedirectURL(URL));
> >
> > Yeilds an url like this:
> >
> http://my.domain/some_form.htm;jsessionid=lidfano10
> >
> > and a 404 not found error.
> >
> > I use JRun at work because my company is
> predjudiced
> > against free software, and it uses the '?' to
> separate
> > the url and the query string which I thought was
> > standard. BTW, I'm using Tomcat 3.2.1 and Apache
> > 1.3.14 on Mandrake 7.2. I saw some workarounds
> posted
> > to the list, but I'm curious as to why Tomcat
> behaves
> > this way. Does either 3.2.2, 3.3 or 4.0 do things
> > differently? I know 4.0 is the cutting or perhaps
> > bleeding edge, but is 3.3  mostly stable though it
> > hasn't been through beta testing yet?
> >
> >
> > =====
> > -
> > rascharles@yahoo.com
> > Hacking is a "Good Thing!"
> > See
> http://www.tuxedo.org/~esr/faqs/hacker-howto.html
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> - only $35
> > a year!  http://personal.mail.yahoo.com/
> >
> 


=====
-
rascharles@yahoo.com
Hacking is a "Good Thing!"
See http://www.tuxedo.org/~esr/faqs/hacker-howto.html

__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Re: URL encoding and ';' rather than '?'

Posted by Peter Hrastnik <pe...@1012surf.net>.
It's a know bug. It is listed at the Apache bug database having the bug id
1388. You can find more information here:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1388

Bye,
	Peter.

-- 
Mag. Peter Hrastnik
tele.ring Telekom Service GmbH
A-1030 Wien, Hainburgerstr. 33
Tel.: +43/1/931012/3277, Mobil: +43/650/6503277



On Sat, 2 Jun 2001, Charles Baker wrote:

> I've been browsing the archives but still haven't seen
> what I'm looking for. Why does Tomcat use ';' rather
> than '?' when an URL gets encoded?
>
> Example:
>
> URL = "http://my.domain/some_form.htm";
> response.sendRedirect(response.encodeRedirectURL(URL));
>
> Yeilds an url like this:
> http://my.domain/some_form.htm;jsessionid=lidfano10
>
> and a 404 not found error.
>
> I use JRun at work because my company is predjudiced
> against free software, and it uses the '?' to separate
> the url and the query string which I thought was
> standard. BTW, I'm using Tomcat 3.2.1 and Apache
> 1.3.14 on Mandrake 7.2. I saw some workarounds posted
> to the list, but I'm curious as to why Tomcat behaves
> this way. Does either 3.2.2, 3.3 or 4.0 do things
> differently? I know 4.0 is the cutting or perhaps
> bleeding edge, but is 3.3  mostly stable though it
> hasn't been through beta testing yet?
>
>
> =====
> -
> rascharles@yahoo.com
> Hacking is a "Good Thing!"
> See http://www.tuxedo.org/~esr/faqs/hacker-howto.html
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year!  http://personal.mail.yahoo.com/
>