org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource

Cause:

The error “org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource” occur due to wrong mapping between dispatcherservlet.xml (front controller) and the web.xml servlet name.

Ex:

web.xml

<servlet>
        <servlet-name>naveen</servlet-name>
        <servlet-class>
            org.springframework.web.servlet.DispatcherServlet
        </servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
<servlet-mapping>

The above highlighted word (naveen) should be the prefix of the spring (dispatcherservlet.xml) file.

That is,

naveen-servlet.xml

 

 

Thanks for reading this post….!!

 

93 total views, 3 views today

Leave a Reply

Your email address will not be published. Required fields are marked *