A null pointer will occur if a method is called on an object that is null and according to the API
doc the getRequestDispatcher() method "returns null if the
servlet container cannot return a RequestDispatcher".
I attempted to replicate this in my environment without success. I am using
Tomcat 7 and if the path argument in the getRequestDispatcher() is not valid it does not throw a null pointer exception, instead the servlet sends an HTTP 404 message code to the browser.
Investigating this further I found this post by Charles Lyons that talks in detail about this:
https://coderanch.com/t/453276/java-Web-Component-SCWCD/certification/RequestDispatcher-null-outcome. It appears that server implementation determines the behaviour.
Would you post the stack trace if correcting the path does not solve it.