Since you haven't details what your
ServletHandler are actually trying to do ("stage
1, stage 2, stage 3" means nothing), this reply
is generic.
A ServletContextHandler belongs to a single
context Path.
It manages the ServletContext for all
Servlets and Filters and Listeners belonging to
that ServletContext.
Each Servlet has a url-pattern it can belong
to
Each Filter has a url-pattern it can
participate in.
If you have multiple ServletHandlers, and
expect them to respond on the same url-pattern,
then you have a problem.
You should only have 1 "endpoint" to a HTTP
resource.
You *can* have that single "endpoint" respond
differently depending on request details (such
as method, Content-Type, existence of request
body content, Accept headers, Cache headers,
etc...)
But that difference isn't handled by multiple
servlets, it's handled by a single servlet, with
logic to produce different responses
accordingly.
If you have multiple ServletHandlers because
some handlers respond on different url-patterns,
then great! You just use different url-patterns
when you add them to the ServletContextHandler.
If you have multiple ServletHandlers because
each handler does some subset of actions, then
you are abusing ServletHandlers.
Use Filters for subsets and Servlets for
"endpoint" logic.
To change your delivery options, retrieve your
password, or unsubscribe from this list, visit