On Wed, Apr 28, 1999 at 11:44:33PM +0200, Jean-Luc Rochat wrote:
> use mod_rewrite for this one.

Thanks very much, mod_rewrite turned out to be the ticket for this problem.

I thought I'd summarize the solution to my problem to the list since someone
else may run into this.  Basically, this is a general way to map *any* URL to
a java servlet, including URLs in directories that you are already serving
HTML files out of.  This assumes that you have a zone set up to run servlets
under the /servlets URL.

First, you must have the mod_rewrite module, and the JServ module must come
*before* mod_rewrite in the AddModule list.  In other words:

AddModule mod_jserv.c
AddModule mod_rewrite.c

Then, you set up rewrite rules like this:

RewriteEngine on
RewriteRule ^/mantix/mxbooker$ /servlets/com.mx.webtime.servlets.MxBooker [PT]
RewriteRule ^/mantix/mxclerk$ /servlets/com.mx.webtime.servlets.MxClerk [PT]

Result:

URL /mantix/mxbooker runs servlet com.mx.webtime.servlets.MxBooker
URL /mantix/mxclerk  runs servlet com.mx.webtime.servlets.MxClerk

The key is using the [PT] flag (passthrough) with mod_rewrite, or else the
URLs will try to refer to files, which of course don't exist.

-- 
Steve "Pheran" Snodgrass * [EMAIL PROTECTED] * FORE Systems Unix Administrator
Geek Code: GCS d? s: a- C++ US++++$ P+++ L+ w PS+ 5++ b++ DI+ D++ e++ r++ y+*
  "I want to take over the world because I'm an egomaniac."  --Larry Wall


----------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to