title: Cannot make multiple view resolvers in spring mvc
body: <p>I want to create 2 view resolvers for .jsp and .xhtml pages I've tried multiple times and the process failed
  I have the .jsp view resolver as the highest priority view resolver
  It works fine with .jsp pages but when it comes to .xhtml pages it gives me an error: resource not found
  So it does not process the ".xhtml" view resolver in case the ".jsp" view is not found
  here is the screenshot of the error and the project achitecture:
  <a href="http://postimg.org/image/5cz5iulwd/" rel="nofollow">http://postimg.org/image/5cz5iulwd/</a></p>
  
  <p>Below are the web.xml servle-context.xml and applicationContext.xml codes
  What should I do?</p>
  
  <p>web.xml --></p>
  
  <pre><code>&lt;!-- Spring Security --&gt;
  &lt;filter&gt;
      &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
      &lt;filter-class&gt;org.springframework.web.filter.DelegatingFilterProxy&lt;/filter-class&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;springSecurityFilterChain&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;
  &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
  &lt;/filter-mapping&gt;
  &lt;!-- The definition of the Root Spring Container shared by all Servlets and Filters --&gt;
  &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;classpath*:applicationContext.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;!-- Creates the Spring Container shared by all Servlets and Filters --&gt;
  &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  &lt;!-- Processes application requests --&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;appServlet&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;/WEB-INF/spring/appServlet/servlet-context.xml&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;!-- xhtml mapping --&gt;
  &lt;servlet&gt; 
      &lt;servlet-name&gt;FacesServlet&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;FacesServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.xhtml&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <h2></h2>
  
  <p>applicationContext.xml ---></p>
  
  <pre><code>enter code here &lt;!-- datasource --&gt;
  &lt;bean id="datasource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
      &lt;property name="driverClassName" value="com.mysql.jdbc.Driver"/&gt;
      &lt;property name="url" value="jdbc:mysql://localhost:3306/primefaces"/&gt;
      &lt;property name="username" value="root"/&gt;
      &lt;property name="password" value=""/&gt;
  &lt;/bean&gt;
  &lt;!-- persistenceUnitManager --&gt;
  &lt;bean id="persistenceUnitManager" class="org.springframework.orm.jpa.persistenceunit.DefaultPersistenceUnitManager"&gt;
      &lt;property name="defaultDataSource" ref="datasource"/&gt;
      &lt;property name="persistenceXmlLocations"&gt;
          &lt;list&gt;
              &lt;value&gt;classpath*:META-INF/persistence.xml&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  &lt;!-- entityManagerFactory --&gt;
  &lt;bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
      &lt;property name="persistenceUnitManager" ref="persistenceUnitManager"/&gt;
      &lt;property name="persistenceUnitName" value="UP_TEST"/&gt;
  &lt;/bean&gt;
  &lt;!-- transactionManager --&gt;
  &lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
      &lt;property name="entityManagerFactory" ref="entityManagerFactory"/&gt;
  &lt;/bean&gt;
  &lt;tx:annotation-driven transaction-manager="transactionManager"/&gt;
  &lt;context:annotation-config/&gt;
  &lt;bean id="dao" class="com.test.app.dao.DaoIml"&gt;&lt;/bean&gt;
  &lt;bean id="metier" class="com.test.app.metier.MetierIml"&gt;
      &lt;property name="dao" ref="dao"&gt;&lt;/property&gt;
  &lt;/bean&gt;
  &lt;s:http  use-expressions="true"&gt;
      &lt;s:intercept-url pattern="/admin/**" access="ROLE_ADMIN"/&gt;
      &lt;s:form-login login-page="/login" default-target-url="/default" authentication-failure-url="/login" /&gt;
      &lt;s:logout logout-success-url="/login" /&gt;
  &lt;/s:http&gt;
  &lt;s:authentication-manager&gt;
      &lt;s:authentication-provider&gt;
          &lt;s:password-encoder hash="md5"&gt;&lt;/s:password-encoder&gt;
          &lt;s:jdbc-user-service data-source-ref="datasource" users-by-username-query="select user_name,password, actived from users where user_name=?" authorities-by-username-query="select u.user_name, r.roleName from users u, role r where u.user_id = r.user_id and u.user_name =? " /&gt;
      &lt;/s:authentication-provider&gt;
  &lt;/s:authentication-manager&gt;
  </code></pre>
  
  <hr>
  
  <p>and here is the servlet-context.xml
  </p>
  
  <pre><code>&lt;!-- Enables the Spring MVC @Controller programming model --&gt;
  &lt;annotation-driven /&gt;
  
  &lt;!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory --&gt;
  &lt;resources mapping="/resources/**" location="/resources/" /&gt;
  
   &lt;beans:bean id="viewResolver"
     class="org.springframework.web.servlet.view.UrlBasedViewResolver"&gt;
  &lt;beans:property name="viewClass" value="org.springframework.web.servlet.view.JstlView"&gt;&lt;/beans:property&gt;
  &lt;beans:property name="prefix" value="/WEB-INF/views/" /&gt;
  &lt;beans:property name="suffix" value=".jsp" /&gt; 
  &lt;beans:property name="order" value="0" /&gt;
  &lt;/beans:bean&gt;
  
  
  &lt;beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;beans:property name="prefix" value="/WEB-INF/views/" /&gt;
      &lt;beans:property name="suffix" value=".xhtml" /&gt;
        &lt;beans:property name="order" value="1" /&gt;
  &lt;/beans:bean&gt;
  
  &lt;context:component-scan base-package="com.test.app" /&gt;
  </code></pre>