In this section, you will learn about dispatch method of AsyncContext Interface.
The AsyncContext Interface dispatch() method is of two types :
Given below a sample snippet using dispatch() method :
Consider a scenario where we have three Servlets - X , Y and Z which have URLs : /x , /y & /z :
Within Servlet X, we have :
Within Servlet Y, we have :
Within Servlet Z, we have following two statements :
request.startAsync().dispatch(); // to /y
request.startAsync(request, response).dispatch(); // to /z
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.