tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexandros Kotsiras" <kotsi...@mediaondemand.com>
Subject RE: URL Rewriting
Date Thu, 20 Jul 2000 16:38:49 GMT
I tried to do the URL Rewriting manually by use of a simple method like :


// session1.jsp

<%! String myencodeURL(String url, HttpSession session)

        return url + ";jsessionid=" + session.getId();
    }
%>

<A href="<%=myencodeURL("session2.jsp", session)%>" >go to session2</A>

It doesn't work. Apache does not like the semi-colon ";" and that's where
the  mod_rewrite should be usefull but
it didn't help.
I also see people saying that encodeURL works with Apache and i don't know
what's going on.
I have neever also seen an "Official opinion" from somebody of the Tomcat
Developers
I just hope, that it will be fixed in a future version

-----Original Message-----
From: David Eisner [mailto:cradle@Glue.umd.edu]
Sent: Thursday, July 20, 2000 11:20 AM
To: 'tomcat-user@jakarta.apache.org'
Subject: RE: URL Rewriting


On Thu, 20 Jul 2000, Jeremy Boyd wrote:

> OK... now I've heard two different stories.  Some people say URLEncoding
> does work in Apache+Tomcat 3.1 and now I hear it won't... what is the
> consensus from the rest of you?  Does URLEncoding work or not?  What does
> everybody think?  Here's your chance to put in your 2 cents.  Thanks
>

I will tell you my experience, with both Tomcat 3.1, and 3.2b1.  What
I did is have my servlet take a sample URL, use encodeURL(), and then
use System.out.println() to see the encoded URL, even before it was
used.

My basic finding was that if you use port 8080, bypassing Apache, then
URL encoding worked.  If I used port 80, however, encodeURL() just
returned the URL unchanged.

This occured whether or not I had the mod_rewrite stuff included.  This
doesn't surprise me, because I think the mod_rewrite is only used
when Apache *receives* an enocoded URL.  But my conclusion is that with
apache, the servlet isn't even producing an encoded URL.

-David



> -----Original Message-----
> From: ALEXANDROS KOTSIRAS [mailto:ALEXANDROS_K@prodigy.net]
> Sent: Wednesday, July 19, 2000 8:11 PM
> To: tomcat-user@jakarta.apache.org
> Subject: Re: URL Rewriting
>
>
> It's a well known problem. I don't think that it has been resolved yet.
>
> ----- Original Message -----
> From: Jeremy Boyd <jboyd@docmagic.com>
> To: <tomcat-user@jakarta.apache.org>
> Sent: Wednesday, July 19, 2000 7:12 PM
> Subject: URL Rewriting
>
>
> > Why doesn't encodeURL() work in Apache-Tomcat? It works fine with Tomcat
> > standalone.
> >
> > I have added this to the httpd.conf file.
> >
> >   <IfModule mod_rewrite.c>
> >       RewriteEngine     on
> >       # Force URLs with a jsessionid to go to Tomcat. Necessary because
> >       # Apache doesn't recognize that the semi-colon is special.
> >       RewriteRule       ^(/.*;jsessionid=.*)$   $1 [T=jserv-servlet]
> >   </IfModule>
> >
> > But it still only works in standalone mode.  I'm fairly new to Apache
and
> > Tomcat so please frame your in very simple terms and don't assume that
> I've
> > done the basics correctly.
> >
> > Thanks,
> > Jeremy
> >
>

-----------------------------------------------------
David Eisner            | E-mail: cradle@eng.umd.edu |
CALCE EPSC              | Phone:  301-405-5341       |
University of Maryland  | Fax:    301-314-9269       |
-----------------------------------------------------


Mime
View raw message