title: Why Spring InternalResourceView doesn't throw an exception about not existing JSP file?
body: <p>Is it intended that Spring MVC doesn't throw <code>ServletException</code> when the expected JSP doesn't exist?<br>
  Code snippet below is the part of <code>InternalResourceView</code>, where an exception should be made in my opinion. <code>RequestDispatcher</code> might be null because there's no file on dispatcherPath.<br>
  In detail, dispatcherPath looks like <code>/WEB-INF/jsp/v2/post/somename.jsp</code>.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>  // Obtain a RequestDispatcher for the target resource (typically a JSP).
    RequestDispatcher rd = getRequestDispatcher(requestToExpose, dispatcherPath);
    if (rd == null) {
   throw new ServletException(
        "Could not get RequestDispatcher for [" + getUrl() +
        "]: Check that the corresponding file exists within your web application archive!");
    }</code></pre>
  </div>
  </div>
  </p>