📚 Practice Mode
Java Programming and OOP Concepts
Learn at your own pace with hints and detailed explanations
1 / 11
Multiple Choice
From the available options, what is the likely outcome from running the code below? (Choose one.) protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { RequestDispatcher dispatcher = getServletContext().getNamedDispatcher("/ServletB"); dispatcher.forward(request, response); }
- DispatcherNotFoundException.
- Runtime error because of incorrectly formed parameter to getNamedDispatcher() method.
- NullPointerException.
- ServletB can obtain request attribute javax.servlet.forward.request_uri.