Spring Config file
I am using Spring 3.1.0 version. But I am getting error while deployment
due to dispatcher-servlet.xml. Here is the code I am using:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<context:component-scan base-package="com.mycompany.cart" />
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix">
<value>/WEB-INF/pages/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>
</beans>
Error is :
Error occurred during deployment: Exception while loading the app :
java.lang.IllegalStateException: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException:
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException:
Line 5 in XML document from ServletContext resource
[/WEB-INF/mvc-dispatcher-servlet.xml] is invalid; nested exception is
org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 93;
cvc-elt.1: Cannot find the declaration of element 'beans'.. Please see
server.log for more details.
I tried to find the correct bean file but not succeeded. Can you guys
please advise where should i search the config file as per my spring
version.
No comments:
Post a Comment