I'm trying to get familiar with the XMLViewResolver, so I included the following into m *-servlet.xml:
<bean class="org.springframework.web.servlet.view.XmlViewResolver">
<property name="location">
<value>/WEB-INF/spring-views.xml</value>
</property>
<property name="order" value="0" />
</bean>
The Spring-views.xml looks like this (just a snippet):
<?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
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
<bean id="insertEntryForm" class="org.springframework.web.servlet.view.JstlView">
<property name="url" value="/WEB-INF/views/admin/insertEntryForm.jsp"></property>
</bean>
....
When I try to load this jsp it gives me the following error:
"NetworkError: 404 Not Found - http://localhost:8080/LiteratureVisualization/admin/insertEntryForm.html"
How can I solve this problem? I want to use XMLViewResolver, because I can map multiple folders (inside the views-directory) individually... or is there a different solution for this?
If you have a web.xml
configuration file in your project, check that XML file is included in context parameters:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/application-context.xml
/WEB-INF/application-security.xml
/WEB-INF/spring-pdf-views.xml
</param-value>
</context-param>
I had the same problem integrating iText library and I had to include XML file here.