AW: URI Rewritng using Apache/mod_ssl..the old story

2001-06-27 Thread Tassilo Pilati

Hi guys,

i have been following this subject around for a while. In the 3.2.2 final
version of Tomcat URL rewritting also does not work in standalone mode (port
80). This seems really, really strange ... I wonder what these programmers
are doing. Have you heard about a solution ?

Tassilo

-Ursprungliche Nachricht-
Von: Wolle [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 30. Mai 2001 08:50
An: tomcatDev; tomcatUser
Betreff: URI Rewritng using Apache/mod_ssl..the old story



I have just installed TC3.2.2 final, and URI Rewiting won't work over
mod_ssl
and apache.
without ssl it works fine, also.
I have set the TOMCAT_HOME and the JAVA_HOME... but it won't work
Or isn't it fixed on TC3.2.2 ??
When I install the two external classes from jdk jsse.jar and jnet.jar
in tomcat/lib and start it with an environment variable like bleow (old
bug #578 walkaround) it will work.
The only thing that's gone is that I don't have to patch the
HttpServletResponseFacade.java file out of
tomcat/lib/webserver.jar...
I've indeed tested this behavior with the standard class to test the
sessiontracking whoch comes with tomcat.

Greetings and thanks for inconvenience,
Michael
plz wrote back

Marc Saegesser wrote:

> A change very similar to what you propose for
HttpServletResponseFacade.java
> was already made for Tomcat 3.2.2b4.  There are two conditions that I
know
> of where URL rewritting won't work.  If you using AJP12 and an SSL
port
> other than 443 then Tomcat won't be told that the connection is secure
and
> will think that that the URL scheme is HTTP not HTTPS.
> HttpServletResponseFacade checks that the scheme of the URL to be
encoded
> and the scheme of the current request are the same.  To encode an
HTTPS url
> you must be on an HTTPS request.  [Note:  I'm sure I really understand
this
> requirement, but its been this way for a long time.]
>
> So the two ways I know of for URL rewriting to fail are if you using
AJP12
> and SSL on something other than 443 or if your encoding an HTTPS URL
during
> an HTTP request.  Are either of these true for your case?
>
> To help diagnose this, could you access the SnoopServlet that comes
with
> Tomcat via your SSL connection and post the results.  This page will
> indicate whether Tomcat thinks the request is secure or not, and if it

> thinks the URL scheme is HTTPS.
>
> Thanks, we'll get this worked out.
>
> > -Original Message-
> > From: Wolle [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, May 04, 2001 5:19 AM
> > To: [EMAIL PROTECTED]; GOMEZ Henri
> > Subject: Re: TC 3.2.2b4 URI Rewriting with mod_ssl
> >
> >
> >
> > Hello,
> > sorry I just wake up ;-)
> > Wolle wrote:
> >
> > > GOMEZ Henri wrote:
> > >
> > > > >That is a known Bug ,see
> > > > >http://nagoya.apache.org/bugzilla/show_bug.cgi?id=578
> > > > >Marc has said, that he has fixed in the current release
> > > > >TC3.2.2b4, but it
> > > > >won't work.
> > > > >What should I describe now ? The workaround was
> > > >
> > > > Fixed by costin in TC 3.3 since 01/04/22 11:56:03
> > >
> > > so I have all these things  in TC3.2.2b4, fill it be insert in
> > TC3.2.2 final ?
> >
> > not fill -> new sentence
> > so I have to do all these things in TC3.2.2b4, will it be
> > completly insert in
> > TC3.2.2 final ?
> >
> > >
> > >
> > > >
> > > >
> > > > >1. install the jnet.jar and jsse.jar in the ROMCAT/lib dir.
> > > > >2.set the TOMCAT_OPTS
> > > >
>=-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol
> > > > >3. Modify the HttpServletResponseFacade.java:
> > > > >retrieving revision 1.6.2.3
> > > > >diff -u -r1.6.2.3 HttpServletResponseFacade.java
> > > > >---
src/share/org/apache/tomcat/facade/HttpServletResponseFacade.java
> > > > >2001/03/06 17:38:13 1.6.2.3
> > > > >+++
src/share/org/apache/tomcat/facade/HttpServletResponseFacade.java
> > > > >2001/03/20 13:29:41
> > > > >@@ -353,10 +353,14 @@
> > > > >return (false);
> > > > >if
(!request.getServerName().equalsIgnoreCase(url.getHost()))
> > > > >return (false);
> > > > >-// Set the URL port to HTTP default if not available
before
> > > > >comparing
> > > > >+// Set the URL port to protocol default if not
> > > > >available before
> > > > >comparing
> > > > > int urlPort = url.getPort();
> > > > > if (urlPort == -1) {
> > > > >-urlPort = 80;
> > > > >+if("http".equalsIgnoreCase(url.getProtocol())) {
> > > > >+urlPort = 80;
> > > > >+} else if
> > ("https".equalsIgnoreCase(url.getProtocol())) {
> > > > >+urlPort = 443;
> > > > >+}
> > > > > }
> > > > >if (request.getServerPort() != urlPort)
> > > > >return (false);
> > > >
> > > > That code need to be commited in 3.2.2b4
> > >
> > > only this, or the other two step also ?
> >
> > only this, or the other two steps also ?
> >
> >
> > >
> > >
> > > >
> > > >
> > > > >I have made this with TC3.2.2b2 and TC3.2.2b3, and this work

url rewriting session cookies

2001-06-27 Thread Tassilo Pilati

Hello,

i`m running Tomcat 3.2.2 under Linux, standalone on port 80. If I set
noCookies="true" (conf/serverl.xml) so that URL rewritting is used instead
of cookies, I get an error.

The reason is that ;jsessionid=cxxdfs is append to the URL and so Tomcat
does not seem to understand that it is a .jsp file to handle.

I can`t understand that Tomcat is having a problem with this. I mean isn`t
this basic stuff, which should work out of the box ???

Thanks

TP




Javascript not working

2001-06-21 Thread Tassilo Pilati

Hi,

I have some jsp files, which work under JRun on our intranet, but when I put
them on our server on the internet and open them with a browser, I get a
javascript error message in the status bar at the bottom of the browser
window.

Since the jsp files are running on the server in the lan, the reason must
have something to do with tomcat, but I have absolutely no idea what I`m
doing wrong. Is there a special MIME type for using javascript ?

TP




AW: Can Sessions be tracked via URL-rewriting?

2001-04-19 Thread Tassilo Pilati

But it will not work if you are using Apache with Tomcat. It only works with
Tomcat standalone or Apache and Tomcat and cookies turned on. However, if
the client disables cookies... your site won`t work for him.
-Ursprungliche Nachricht-
Von: Wolle [mailto:[EMAIL PROTECTED]]
Gesendet: Donnerstag, 19. April 2001 10:36
An: [EMAIL PROTECTED]
Betreff: Re: Can Sessions be tracked via URL-rewriting?


Hei,
You have to do it in your Servlet/JSP
with the Methode encodeURL or encodeRedirectURL.
response.encodeURL("/test/URL")
This have you to do with all your Links in the Servelt.
Tomcat will automaticly choose the URI-Rewriting if the cookies are
disabled.
When the cookies are enabled, the encodeURL Methode won't change the URL.
So you don't have to handle it if there cookies or not.

Greetings
Michael

Robert Zazueta wrote:

> Nope. Where would I need to do that? In all of my servlets, or in the
> Tomcat code?
>
> -Original Message-
> From: William Kaufman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, April 18, 2001 1:42 PM
> To: '[EMAIL PROTECTED]'
> Subject: RE: Can Sessions be tracked via URL-rewriting?
>
> Are you asking Tomcat to do URL re-writing (by calling
> HttpServletResponse.encodeURL())?
>
> -- Bill K.
>
> > -Original Message-
> > From: Robert Zazueta [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, April 18, 2001 1:35 PM
> > To: [EMAIL PROTECTED]
> > Subject: Can Sessions be tracked via URL-rewriting?
> >
> >
> > Fresh out of the "box", Tomcat appears to write the jsession ID to the
> > users cookies exclusively, making those who don;t have
> > cookies turned on
> > for whatever reasons lose their session.
> >
> > Is there a way to configure Tomcat so that it writes the jsession via
> > URL-rewriting for those folks without cookies turned on? Or even just
> > replaces the jsession cookie with URL-rewriting entirely?
> >
> > Thanks!
> >
> > Rob Z.
> >






AW: losing track of sessions

2001-04-18 Thread Tassilo Pilati



Interesting... are you using Apache ? I`m running Tomcat 3.2.1 with 
Apache. When I use URL rewritting I run into problems becuase Apache does not 
passover the requests to Tomcat. It gets confused with the ;jsessionid string 
which Tomcat appends to an url to enforce session tracking using url rewritting. 
Do you use virtual hosts ? Have you inserted any rewrite rules into the 
http.conf of Apache ?

  -Ursprüngliche Nachricht-Von: Gerard Quinn 
  [mailto:[EMAIL PROTECTED]]Gesendet: Mittwoch, 18. April 2001 
  19:22An: [EMAIL PROTECTED]Betreff: losing 
  track of sessions
  I am using Tomcat 
  4 beta 3 to develop a site.
  Every so often if 
  I have the "allow session cookies" option set in my 
  browser,
  My sessions get 
  lost or invalidated or something.
  If I disable this 
  option and let the server use url rewriting 
  my site works 
  fine.
  Does anyone know 
  if this is a server problem or could it be a problem with my 
  code.
  Thanks in 
  advance.
   
  Gerard.


AW: worker.properties

2001-04-18 Thread Tassilo Pilati

Well, this file is in the conf directory of my tomcat installation. But I
don`t get an error message 

-Ursprüngliche Nachricht-
Von: Sam Newman [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 18. April 2001 15:36
An: [EMAIL PROTECTED]
Betreff: Re: worker.properties


The workers.properties file configures the worker threads that take requests
for servlets/jsp's from apache and processes them appropirately. As such,
when running Tomcat without Apache it will have no effect. You only need to
edit this file when you run Apache and Tomcat together. Infact you'll get a
syntax error on a non-PC platform if you forget to edit this file and try
and include it in the Apache directives. See the workers.properties howto
for more information (its in the Tomcat docs somewhere).

sam
- Original Message -----
From: "Tassilo Pilati" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 1:47 PM
Subject: worker.properties


> Hello,
>
> i did not edit my worker.properties file at all. I`m using Tomcat 3.2.1.
It
> is working with Apache and in standalone mode (besides that session
> tracking, using URL rewritting is not working, which is another issue).
> Anyway, I was wondering if I have to edit this file. For example I see in
> the file that the workers.tomcat_home and the workers.java_home is not set
> correclty, as it is configured for the windows plattform. Nevertheless,
> tomcat is starting up and working, so I was just wondering if that is
normal





AW: Tomcat with Apache/URLRewritting and mod_rewrite

2001-04-18 Thread Tassilo Pilati

I`m using mod_jk and apj13, however I tried apj12 as well but it should not
make a difference. Tomcat version is 3.2.1. You probably set the noCookies
parameter to false. Then session tracking is implemented using Cookies and
it probably will work. If you set it to false, then session tracking via URL
rewritting is used instead and you should run into the problem I have. Do
you have the string ";jsessionid=" in you urls, when you are using session
tracking ? You probably don`t...

-Ursprüngliche Nachricht-
Von: Sam Newman [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 18. April 2001 15:33
An: [EMAIL PROTECTED]
Betreff: Re: Tomcat with Apache/URLRewritting and mod_rewrite



- Original Message -----
From: "Tassilo Pilati" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, April 18, 2001 1:27 PM
Subject: AW: Tomcat with Apache/URLRewritting and mod_rewrite


> But SSL has nothing to do with my problem. The problem I have is that when
> using Tomcat in standalone mode URL rewritting works, however, running
> Tomcat in combination with Apache does not, because Apache does not hand
the
> request over to Tomcat. I think is is stange that there is nothing
mentioned
> about this in the tomcat user guide - section Setting Tomcat up with
Apache.
> I think so many people are using Tomcat with Apache that it is really a
very
> important issue ?! I mean session tracking is fundamental and it should
work
> using URL rewritting. I guess many people use cookies for session tracking
> instead of URL rewritting. Probably with cookies it should work, so maybe
> that`s why this issue hasn`t really come to the attention to the tomcat
> developers ? What do you think ?
>
Just to clarify, are you using jserv or mod_jk? And if you are using mod_jk,
are you using the ajpv13 protocl for connection? I'm using mod_jk and
ajpv13, and am session tracking using the HttpSesession class and it works
fine, as does parameter passing. I don't know too much about URL reqritting
though.

sam




worker.properties

2001-04-18 Thread Tassilo Pilati

Hello,

i did not edit my worker.properties file at all. I`m using Tomcat 3.2.1. It
is working with Apache and in standalone mode (besides that session
tracking, using URL rewritting is not working, which is another issue).
Anyway, I was wondering if I have to edit this file. For example I see in
the file that the workers.tomcat_home and the workers.java_home is not set
correclty, as it is configured for the windows plattform. Nevertheless,
tomcat is starting up and working, so I was just wondering if that is normal
? Here is my workers file...

# ... skipped header comments ...
#
# workers.tomcat_home should point to the location where you
# installed tomcat. This is where you have your conf, webapps and lib
# directories.
#
workers.tomcat_home=c:\jakarta-tomcat

#
# workers.java_home should point to your Java installation. Normally
# you should have a bin and lib directories beneath it.
#
workers.java_home=c:\jdk1.2.2

#
# You should configure your environment slash... ps=\ on NT and / on UNIX
# and maybe something different elsewhere.
#
ps=\
# ps=/

#
#-- ADVANCED MODE 
#-
#

#
#-- DEFAULT worket list --
#-
#
#
# The workers that your plugins should create and work with
#
worker.list=ajp12, ajp13

#
#-- DEFAULT ajp12 WORKER DEFINITION --
#-
#

#
# Defining a worker named ajp12 and of type ajp12
# Note that the name and the type do not have to match.
#
worker.ajp12.port=8007
worker.ajp12.host=localhost
worker.ajp12.type=ajp12
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  > lbfactor must be > 0
#  > Low lbfactor means less work done by the worker.
worker.ajp12.lbfactor=1

#
#-- DEFAULT ajp13 WORKER DEFINITION --
#-
#

#
# Defining a worker named ajp13 and of type ajp13
# Note that the name and the type do not have to match.
#
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
#
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  > lbfactor must be > 0
#  > Low lbfactor means less work done by the worker.
worker.ajp13.lbfactor=1

#
# Specify the size of the open connection cache.
#worker.ajp13.cachesize

#
#-- DEFAULT LOAD BALANCER WORKER DEFINITION --
#-
#

#
# The loadbalancer (type lb) workers perform wighted round-robin
# load balancing with sticky sessions.
# Note:
#  > If a worker dies, the load balancer will check its state
#once in a while. Until then all work is redirected to peer
#workers.
worker.loadbalancer.type=lb
worker.loadbalancer.balanced_workers=ajp12, ajp13


#
#-- DEFAULT JNI WORKER DEFINITION-
#-
#

#
# Defining a worker named inprocess and of type jni
# Note that the name and the type do not have to match.
#
worker.inprocess.type=jni

#
#-- CLASSPATH DEFINITION -
#-
#

#
# Additional class path components.
#
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)classes

#
# The XML parser provided with Tomcat
#
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)jaxp.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)parser.jar

#
# Tomcat's implementation
#
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)jasper.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)servlet.jar
worker.inprocess.class_path=$(workers.tomcat_home)$(ps)lib$(ps)webserver.jar

#
# Javac as available from Java2SE
#
worker.inprocess.class_path=$(workers.java_home)$(ps)lib$(ps)tools.jar

#
# Setting the command line for tomcat
# Note: The cmd_line string may not contain spaces.
#
worker.inprocess.cmd_line=-config
worker.inprocess.cmd_line=$(workers.tomcat_home)/conf/jni_server.xml
worker.inprocess.cmd_line=-home
worker.inprocess.cmd_line=$(workers.tomcat_home)

#
# The JVM that we are about to use
#
# This is for Java2
#
worker.inprocess.jvm_lib=$(workers.java_home)$(ps)jre$(ps)bin$(ps)classic$(p
s)jvm.dll

#
# And this is for jdk1.1.X
#
#worker.inprocess.jvm_lib=$(workers.java_home)$(ps)bin$(ps)javai.dll
#

#
# Setting the place for the stdout and stderr of tomcat
#
worker.inprocess.stdout=$(workers.tomcat_home)$(ps)inprocess.stdout
worker.inprocess.stderr=$(workers.tomcat_home)$(ps)inprocess.stderr

#
# Setting the tomcat.home Java property
#
worker.inprocess.sysprops=tomcat.home=$(worker

AW: Tomcat with Apache/URLRewritting and mod_rewrite

2001-04-18 Thread Tassilo Pilati

But SSL has nothing to do with my problem. The problem I have is that when
using Tomcat in standalone mode URL rewritting works, however, running
Tomcat in combination with Apache does not, because Apache does not hand the
request over to Tomcat. I think is is stange that there is nothing mentioned
about this in the tomcat user guide - section Setting Tomcat up with Apache.
I think so many people are using Tomcat with Apache that it is really a very
important issue ?! I mean session tracking is fundamental and it should work
using URL rewritting. I guess many people use cookies for session tracking
instead of URL rewritting. Probably with cookies it should work, so maybe
that`s why this issue hasn`t really come to the attention to the tomcat
developers ? What do you think ?

-Ursprungliche Nachricht-
Von: Wolle [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 18. April 2001 13:56
An: [EMAIL PROTECTED]
Betreff: Re: Tomcat with Apache/URLRewritting and mod_rewrite


Hello,
yes, you're right, the Protocol ajp13 supports the SSL protocol better
(relating
to the methode request.isSecure() ).
But this SSL and URL Rewriting is a Bug , see:
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=578

This has been fixed in the last csv release, and will hoply be fixed in the
3.2.2 final release or 3.2.2b4, also.

Greetings,
Michael

Sam Newman wrote:

> It can (see the Apache-tomcat readme in the tomcat distro), but it is
> strongly suggested that you use mod_jk & tomcat instead of using JServ as
it
> has less bugs, is faster, and I believe is also better maintained.
>
> sam
> - Original Message -----
> From: "Tassilo Pilati" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, April 18, 2001 11:03 AM
> Subject: AW: Tomcat with Apache/URLRewritting and mod_rewrite
>
> > Do you know if the mod_jserv can be used with tomcat ?
> >






AW: [strange bug] web.xml for servlet mapping exceed 4 url-pattern.

2001-04-18 Thread Tassilo Pilati

I have the same problem I think. When I register more than 1 servlet only
the first one is used. The others are ignored.

-Ursprungliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Samuel
ARNOD-PRIN
Gesendet: Mittwoch, 18. April 2001 12:33
An: [EMAIL PROTECTED]
Betreff: [strange bug] web.xml for servlet mapping exceed 4 url-pattern.


Hello

I've discovered a strange bug.

I have got a servlet that has to serve a few extensions : html, jsp,
xml, pl, and so on..

I use the xml code ... when I put more than 4
servlet-mappings on the same servlet, the JSP are serve by tomcat and
not by my servlet. How Strange !

could anyone explain why ??

I am using Linux Mandrake 7.2, Tomcat 3.2.2beta and JDK 1.3




AW: Tomcat with Apache/URLRewritting and mod_rewrite

2001-04-18 Thread Tassilo Pilati

Do you know if the mod_jserv can be used with tomcat ?

-Ursprüngliche Nachricht-
Von: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 18. April 2001 11:47
An: '[EMAIL PROTECTED]'
Betreff: AW: Tomcat with Apache/URLRewritting and mod_rewrite


Sorry I'm not even using tomcat.
Still using jserv 1.1.*.

> -Ursprüngliche Nachricht-----
> Von: Tassilo Pilati [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 18. April 2001 10:49
> An: [EMAIL PROTECTED]
> Betreff: AW: Tomcat with Apache/URLRewritting and mod_rewrite
>
>
> The mod_rewrite gets loaded in my http.conf. I also added the
> rewrite rule
> but it did not work. According to the application name
> jserv-servlet it
> seems to me as this rewrite rule is meant to be used with
> jserv not with
> mod_jk ?! Nowhere in my http.conf file could I find a
> definition of the
> application jserv-servlet, which I guess must be defined in
> order for this
> rule to work. Are you running Tomcat with Apache ??
>
> -Ursprüngliche Nachricht-
> Von: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 18. April 2001 07:41
> An: '[EMAIL PROTECTED]'
> Betreff: AW: Tomcat with Apache/URLRewritting and mod_rewrite
>
>
> For the remarks see below:
>
> > -Ursprüngliche Nachricht-
> > Von: Tassilo Pilati [mailto:[EMAIL PROTECTED]]
> > Gesendet: Dienstag, 17. April 2001 17:47
> > An: [EMAIL PROTECTED]
> > Betreff: Tomcat with Apache/URLRewritting and mod_rewrite
> 
> > 
> >   RewriteEngine On
> >   RewriteRule  ^(/.*;jsessionid=.*)$  $1  [T=jserv-servlet]
> > 
> 
> The mod_rewrite must be loaded to enable the rule. (e.g.:
> LoadModule rewrite_module /usr/local/apache/lib/mod_rewrite.so)
>
> 
> > I also was wondering what the [T=jserv-servlet] means ?
> 
>
> From the mod_rewrite documentation:
>
> 'type|T=MIME-type' (force MIME type)
>   Force the MIME-type of the target file to be MIME-type. For
>   instance, this can be used to simulate the mod_alias directive
>   ScriptAlias which internally forces all files inside the
>   mapped directory to have a MIME type of
>   ''application/x-httpd-cgi''.
>
>




AW: Tomcat with Apache/URLRewritting and mod_rewrite

2001-04-18 Thread Tassilo Pilati

The mod_rewrite gets loaded in my http.conf. I also added the rewrite rule
but it did not work. According to the application name jserv-servlet it
seems to me as this rewrite rule is meant to be used with jserv not with
mod_jk ?! Nowhere in my http.conf file could I find a definition of the
application jserv-servlet, which I guess must be defined in order for this
rule to work. Are you running Tomcat with Apache ??

-Ursprüngliche Nachricht-
Von: Ralph Einfeldt [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 18. April 2001 07:41
An: '[EMAIL PROTECTED]'
Betreff: AW: Tomcat with Apache/URLRewritting and mod_rewrite


For the remarks see below:

> -Ursprüngliche Nachricht-
> Von: Tassilo Pilati [mailto:[EMAIL PROTECTED]]
> Gesendet: Dienstag, 17. April 2001 17:47
> An: [EMAIL PROTECTED]
> Betreff: Tomcat with Apache/URLRewritting and mod_rewrite

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

The mod_rewrite must be loaded to enable the rule. (e.g.:
LoadModule rewrite_module /usr/local/apache/lib/mod_rewrite.so)


> I also was wondering what the [T=jserv-servlet] means ?


>From the mod_rewrite documentation:

'type|T=MIME-type' (force MIME type)
  Force the MIME-type of the target file to be MIME-type. For
  instance, this can be used to simulate the mod_alias directive
  ScriptAlias which internally forces all files inside the
  mapped directory to have a MIME type of
  ''application/x-httpd-cgi''.




Tomcat with Apache/URLRewritting and mod_rewrite

2001-04-17 Thread Tassilo Pilati

Hello,

I have Tomcat 3.2.1 and Apache installed under Linux. Unfortuantely, after I
switched from standalone mode to Apache with Tomcat, session tracking
stopped working. I searched the FAQ and found out that it is a problem with
apache not handing over the request to the Tomcat engine due to the appended
session id string in the URL. However, I have not come across a HOWTO which
explains how to resolve this. There seem to be many people out there who are
having the same problem and I think it would be very usefull to include a
solution into the Tomcat user guide or mod_jk-HOWTO, since to my mind this
is a fundamental configuration setup, which everybody needs when running
tomcat in combination with apache. For the time being I would appreciate it
very much if somebody who knows the solution, or has a good HOWTO could help
me solving this. In the Tomcat FAQ somebody mentions to include the
following lines:


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


I have to admit that I`m not used no url rewritting with apache. Including
this in the mod_jk.conf-auto at various point or directly in the http.conf
did not work. I also was wondering what the [T=jserv-servlet] means ?

Thanks!

T. Pilati