The spec for Servlet 3.0 has three code samples illustrating AsyncContext.dispatch() behavior. Here is one of them:
//REQUEST to /url/A
//FORWARD to /url/B
Line 1: getRequestDispatcher("/url/B").forward(request, response);
Line 2: AsyncContext ac = request.startAsync();
Line 3: ac.dispatch(); //does ASYNC dispatch to /url/A
According to the spec, in this case "... the dispatch is to the URI of the request when it was last dispatched by the container." In my understanding, in the example above the request was last dispatched to /url/B (Line 1). Why is it that they insist the dispatch will be to /url/A (see comment to Line 3)? Is forwarding by a RequestDispatcher not considered to be container dispatching? That's the onyl explanation I could have. Am I right?