tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mel Martinez <melaqu...@yahoo.com>
Subject apache Alias&Rewrites vs tomcat?
Date Tue, 13 Feb 2001 22:11:08 GMT
I'm trying to assertain just how Apache and Tomcat
interact regarding aliases and rewrites.

I'm using Apache 1.3.14 and tomcat 3.2.1 with
mod_jk.c.  I don't know if the latter is the 'latest'
version.

If I have apache configured to apply an alias or a
rewrite rule to a reqest, I can tell from the logs
that it is indeed getting applied:

 (2) init rewrite engine with requested uri
/myapp/folder1/common/mypage.jsp
 (3) applying pattern '^/myapp/(.*)/common/(.*)' to
uri '/myapp/folder1/common/mypage.jsp'
 (2) rewrite /myapp/folder1/common/mypage.jsp ->
/myapp/common/mypage.jsp
 (2) local path result: /myapp/common/mypage.jsp
 (1) go-ahead with /myapp/common/mypage.jsp [OK]

The idea here is simple: the request

/myapp/folder1/common/mypage.jsp

should result in a request for

/myapp/common/mypage.jsp

The rewrite rule works great.  This works great for
static stuff served up by Apache.

The problem is that Tomcat is not getting the
translated request, it is getting the original one. 
Since no file in that path actually exists, naturally
it returns a file not found error.

Could someone please tell me if this behavior is
correct or if this is a bug in mod_jk?  Should I be
using apj13? (I just noticed that the mod_jk.conf-auto
has the contexts mounted to apj12 so I'll try changing
that).

I seem to recall that JServ obeyed the results of
rewrites.  Should I try using tomcat with mod_jserv? 
'Would seem like walking backwards...

Please help clear this up so I don't spend too much
more time banging my head against this.

Thanks,

Mel


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Mime
View raw message