Hello,
I am trying to use XmlViewResolver like that :
<bean id="viewResolver" class="org.springframework.web.servlet.view.XmlVie wResolver" />
in myApp-servlet.xml.
The views.xml file contains the following View definition :
<bean id="homeView" class="myapp. VelocityLayoutView" parent="baseView">
<property name="url" value="${templates.default.layout}"/>
<property name="main" value="${templates.home.main}"/>
<property name="header2" value="${templates.home.header2}"/>
<property name="footer" value="${templates.default.closing}"/>
</bean>
When the viewResolver tries to create the bean “homeView” it fails because it can’t resolve the property names to the actual Velocity templates and
therefore is looking for a template e.g. named ${templates.default.layout}.
In myApp-servlet.xml I also define the following bean for property name resolution :
<bean id="applicationResourcePropertyConfig" class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:resource.properties</value>
<value>classpath:myApp.properties</value>
</list>
</property>
<property name="searchSystemEnvironment" value="true"/>
</bean>
Would anyone know why the above set up is not working?
Thank you very much,
Savakos


Reply With Quote
