title: Error 500 jsf.js link in spring webflow + myfaces app
body: <p>I develop spring and myfaces app and it produces nonaccessible link to jsf.js.
  Generated page contains link which points to dispatcher servlet:</p>
  
  <pre><code>&lt;script type="text/javascript" src="/myapp/app/javax.faces.resource/jsf.js?ln=javax.faces&amp;amp;stage=Development"&gt;&lt;/script`&gt;
  </code></pre>
  
  <p>This URL gives error 500:
      /WEB-INF/application/javax.faces.resource/jsf.xhtml Not Found in ExternalContext as a Resource</p>
  
  <pre><code>viewId=/WEB-INF/application/javax.faces.resource/jsf.xhtml
  </code></pre>
  
  <p>but I found out that working one is  <code>/myapp/faces/javax.faces.resource/jsf.js</code></p>
  
  <p>So, it looks like it produces link to dispatcher servlet, not to faces one, in my web.xml I made following declarations:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;servlet&gt;
      &lt;servlet-name&gt;Dispatcher Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;&lt;![CDATA[ 
                       /WEB-INF/config/webmvc-config.xml
                      /WEB-INF/config/webflow-config.xml
                      classpath:view-config.xml ]]&gt;
          &lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;2&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Dispatcher Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/app/*&lt;/url-pattern&gt;
  
  &lt;/servlet-mapping&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;Resources Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.js.resource.ResourceServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;0&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Resources Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/resources/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>I am using spring 3.2.6 and myfaces 2.2.4 now, but I tried both to upgrade spring and downgrade myfaces with the same result.</p>
  
  <p>Besides ajax functionality application is working - view is rendered and links to other flow pages work as well.</p>
  
  <p>What I am missing? Which configuration options should I check?</p>
  
  <p>Greetings</p>