You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Steve Taylor <ST...@pangaea.ca> on 2001/05/09 23:00:15 UTC

Apache, encodeURL and mod_rewrite

I have been trying to configure Apache 1.3.19 to work with Tomcat 3.2.1
under HP-UX11 using the mod_jk web server adapter. All the forms within our
jsp pages are submitted with a call to response.encodeURL(). This seems to
be a problem for Apache since it appends a semicolon and the jsessionid to
the url. Apache doesn't seem to know how to pass this on to Tomcat
correctly, if at all. I am using the following rewrite rule:

LoadModule rewrite_module libexec/mod_rewrite.so
AddModule mod_rewrite.c

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(/.*;jsessionid=.*)$ $1 [T=jserv-servlet]
</IfModule> 

This seems to help for a while but eventually Apache throws this garbage to
the screen:
HTTP/1.1 200 OK Date: Wed, 09 May 2001 20:46:42 GMT Server: Apache/1.3.19
(Unix) mod_jk Servlet-Engine: Tomcat Web Server/3.2.1 (JSP 1.1; Servlet 2.2;
Java JavaVM-1.3.0.01; HP-UX B.11.00 PA_RISC; java.vendor=Hewlett-Packard
Co.) Keep-Alive: timeout=15, max=31 Connection: Keep-Alive
Transfer-Encoding: chunked Content-Type: text/html;charset=8859_1 d2 2000 cc

92e 
I have also tried the same configuration on Linux and NT with the same
results. Is "T=jserv-servlet" in the rewrite rule correct if you are using
mod_jk? Any suggestions would be greatly appreciated.

Thanks

> Steve Taylor
> Systems Consultant
> Pangaea Systems Inc.
> (250) 360-0111 ext 210
	http://www.pangaeainc.com