when calling ServletContext,getRequestDispatcher("invalidPath") the method throws an exception. However, the servlet javadocs specify to return null in that case. getRequestDispatcher public RequestDispatcher getRequestDispatcher(java.lang.String path) Returns a RequestDispatcher object that acts as a wrapper for the resource located at the given path. A RequestDispatcher object can be used to forward a request to the resource or to include the resource in a response. The resource can be dynamic or static. The pathname must begin with a "/" and is interpreted as relative to the current context root. Use getContext to obtain a RequestDispatcher for resources in foreign contexts. This method returns null if the ServletContext cannot return a RequestDispatcher.
Every URL is ultimately mapped to the default servlet which is mapped to / if no other servlet matches. The default servlet is the one throwing the exception.