tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: Self Discovery
Date Fri, 18 Feb 2000 03:49:03 GMT
James Cook wrote:

> Is it possible for a servlet, that is preloaded by the server, to discover
> what URL will invoke him? I want my servlets to be able to broadcast to
> other services, which URL can invoke them. Since this can be changed at
> deployment time, the only "safe" way to do this is through some kind of
> server context. Has this been addressed?

Not to solve the problem to which you are referring.

One thing to keep in mind is that there is no restriction allowing only *one*
mapping for a given servlet definition.  You can map the same servlet to
several URI paths, several extensions, and even invoke it via /servlet/xxxxx
if you've configured your servlet container for that.

The only time you unambiguously know how you can be invoked is when you are
processing a specific request -- you can examine the portions of of the
request URI in order to reconstruct a URI that can access themselves.

> thanks,
> jim

Craig McClanahan

View raw message