ServletContext file is not found to the server

error:Could not open ServletContext resource [/WEB-INF/spring-servlet.xml the spring-servlet.xml file is create under web-inf/lib folder<context:component-scan base-package="com.dz.hrportal.controller" />      
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/jsp/" />
<property name="suffix" value=".jsp" />
</bean>       
<bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource">
        <property name="basename" value="classpath:messages"/>     
        <property name="defaultEncoding" value="UTF-8"/>
  </bean>          
    <bean id="localeChangeInterceptor"
        class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor">
        <property name="paramName" value="lang" />
    </bean>

    <bean id="localeResolver"
        class="org.springframework.web.servlet.i18n.CookieLocaleResolver">
        <property name="defaultLocale" value="en"/>
    </bean>          
        <bean id="handlerMapping"
              class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
            <property name="interceptors">
                <ref bean="localeChangeInterceptor" />
            </property>
     </bean>*/

I have gone through this code 10 times still facing the same error. The name of spring-servlet.xml file is same as mentioned in web.xml file as spring while mapping.

Answers


is create under web-inf/lib folder

Comment from the question itself, this is wrong location. Tomcat is trying to search in /web-inf/


Need Your Help

CSRF token can't verified rails Restangular

javascript ruby-on-rails angularjs restangular

I'm trying to delete a user using Restangular. On the server receives a