IDependOn-Set: 1
IDependOn-Set: 2
IDependOn-Set: 46
IDependOn-Set: 47
IDependOn-Set: 51
IDependOn-Set: 7
LastModifiedSecs: 938800575
Parent: 7
SequenceNumber: 14
Title: mod_rewrite doesn't seem to be able to change my mod_jserv URL's
Part: 0
Author-Set: jon@working-dogs.com
HideAttributions: 1
LastModifiedSecs: 921200700
Type: html
Lines: 5
The trick is getting mod_rewrite to execute before mod_jserv. This needs to be done at Apache compile time by having the mod_rewrite module compiled into Apache after the mod_jserv module.
<P>
If you are using the DSO version of Apache, try changing the LoadModule order. If that does not work, then you will probably have to compile a static version of Apache in order to get it to work properly.
<P>
If the above does not work, try reversing the order of the compiling/loading and append to this FAQ which order worked for you.
EndPart: 0
Part: 1
Author-Set: jon@working-dogs.com
HideAttributions: 1
LastModifiedSecs: 921209460
Type: monospaced
Lines: 18
----------
From: <tom.howland@us.pwcglobal.com>
To: Java Apache Users <java-apache-users@list.working-dogs.com>
Subject: RE: mod_rewrite and JServ
Date: Thu, Mar 11, 1999, 7:20 PM


There is an evaluation order in apache such that, if you want to use
mod_rewrite with mod_jserv, you must ensure that the reference to mod_jserv
is *before* the reference to mod_rewrite. What this means is that in the
apache distribution, you have to modify the file
/usr/local/src/apache_1.3.4/src/Configuration so that the line

     AddModule modules/jserv/mod_jserv

appears before the line

     AddModule modules/standard/mod_rewrite.o
EndPart: 1
Part: 2
Author-Set: jon@working-dogs.com
HideAttributions: 1
LastModifiedSecs: 921523560
Type: monospaced
Lines: 7

You have to get sure that mod_rewrite is excuted before mod_jserv. Have
alook in
'modules.c' and check that jserv is before rewrite_module. If not,
correct and recompile apache.

Jean-Luc Rochat
EndPart: 2
Part: 3
Author-Set: gbevin@thunderstorms.org
HideAttributions: 1
LastModifiedSecs: 925392300
Type: 
Lines: 13
This is how I done it :

I compiled mod_jserv and mod_rewrite statically into apache.
Then in the httpd.conf file you have to take care that the line

AddModule mod_jserv.c

comes before

AddModule mod_rewrite.c

it doesn't have to be done in the source dir as suggested above.

EndPart: 3
Part: 4
Author-Set: fewayne@facstaff.wisc.edu
HideAttributions: 1
LastModifiedSecs: 938800575
Type: monospaced
Lines: 19
another hint: i found that while i could apply rewrite rules
in a virtual server, and could access servlets through a virtual
server, i couldn't do both together.  only the rewrite rules in
the main server part of httpd.conf seem to fire servlets.

example:

(in httpd.conf:)
# every page access under /foo/ fires AServlet, with the path part of the
# URL available via request.getQueryString()
RewriteRule ^(/foo/.*) "/servlets/EDU.wisc.soils.package.AServlet?$1" [PT]

(in servlets.properties:)
servlet.EDU.wisc.soils.package.AServlet.initArgs=siteRoot=/apachedir/htdocs

(in the servlet code:)
docRoot = new File(config.getInitParameter("siteRoot"));

etc., etc.
EndPart: 4
