You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jonathan Soons <js...@juilliard.edu> on 2002/09/17 22:44:52 UTC

mapping or handler problem

I am using mod_webapp and it serves up a servlet no problem
from the configured context so that:
http://server/datatel/servlet/servletname
works fine and datatel is the app and configured context.
I need to make the same servlet work with the  URL:
http://server/servlet/servletname
since I cannot change the URL.
Should I use :
<Location /servlet>
	SetHandler run_servlet
</Location>

if so, what is run_servlet really?

If not, is there a right way?

Thank you

jonathan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: mapping or handler problem

Posted by Bill Barker <re...@verizon.net>.
This is so nasty. ;-)

The easiest way is to install "servletname.class" in
$CATALINA_HOME/webapps/ROOT/WEB-INF/classes.  In this case, the Invoker will
pick it up for the DefaultContext.

Since "easiest" rarely works :), you could try using Apache's mod_rewrite to
send the request to the right place:
RewriteRule ^/servlet/servletname/.* /datatel/servlet/servletname/$1 [PT]

The problem with this, is that to get it to work depends on which mod_jk
version you are using.  For the JK 1.1 (the one that ships with 3.3.x) or
1.2, the directive (in your httpd.conf) is:
JkOptions ForwardURICompat

For JK2, I don't know the option.


"Jonathan Soons" <js...@juilliard.edu> wrote in message
news:33E101AC5AFF78419F466954A96854202F5860@mailbox.juilliard.edu...
I am using mod_webapp and it serves up a servlet no problem
from the configured context so that:
http://server/datatel/servlet/servletname
works fine and datatel is the app and configured context.
I need to make the same servlet work with the  URL:
http://server/servlet/servletname
since I cannot change the URL.
Should I use :
<Location /servlet>
SetHandler run_servlet
</Location>

if so, what is run_servlet really?

If not, is there a right way?

Thank you

jonathan





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>