title: Hello World in Spring is not running
body: <p>I am a beginner in Spring.
  Trying to run a simple "Hello World" project
  Using Netbeans IDE 8.1, Glassfish 4.1</p>
  
  <pre><code>&lt;bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/&gt;
  
  &lt;!--
  Most controllers will use the ControllerClassNameHandlerMapping above, but
  for the index controller we are using ParameterizableViewController, so we must
  define an explicit mapping for it.
  --&gt;
  &lt;bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"&gt;
      &lt;property name="mappings"&gt;
          &lt;props&gt;
              &lt;prop key="index.jsp"&gt;indexController&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="viewResolver"
        class="org.springframework.web.servlet.view.InternalResourceViewResolver"
        p:prefix="/WEB-INF/jsp/"
        p:suffix=".jsp" /&gt;
  
  &lt;!--
  The index controller.
  --&gt;
  &lt;bean name="indexController"
        class="org.springframework.web.servlet.mvc.ParameterizableViewController"
        p:viewName="index" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>web.xml</p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;/WEB-INF/applicationContext.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;dispatcher&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;session-config&gt;
      &lt;session-timeout&gt;
          30
      &lt;/session-timeout&gt;
  &lt;/session-config&gt;
  &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;redirect.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  </code></pre>
  
  <p></p>
  
  <p>index.jsp</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
      &lt;title&gt;Example :: Spring Application&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form:form  method="POST" action="addph"&gt;
          &lt;form:label path="name"&gt;Name&lt;/form:label&gt;
          &lt;form:input path="name"&gt;&lt;/form:input&gt;
      &lt;/form:form&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p></p>
  
  <p>When I run the code, browser cant find the page.
  Showing error.
  is there anything I am missing?</p>