github.com/emc-advanced-dev/unik@v0.0.0-20190717152701-a58d3e8e33b7/docs/examples/example_osv_java_servlet/src/main/resources/spring/mvc-view-config.xml (about) 1 <?xml version="1.0" encoding="UTF-8"?> 2 <!-- 3 - DispatcherServlet application context for PetClinic's web tier. 4 --> 5 <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oxm="http://www.springframework.org/schema/oxm" 6 xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns="http://www.springframework.org/schema/beans" 7 xsi:schemaLocation="http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm.xsd 8 http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd 9 http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> 10 <!-- 11 - The ContentNegotiatingViewResolver delegates to the InternalResourceViewResolver and BeanNameViewResolver, 12 - and uses the requested media type (determined by the path extension) to pick a matching view. 13 - When the media type is 'text/html', it will delegate to the InternalResourceViewResolver's JstlView, 14 - otherwise to the BeanNameViewResolver. 15 --> 16 <mvc:view-resolvers> 17 <mvc:content-negotiation use-not-acceptable="true"> 18 <mvc:default-views> 19 <bean class="org.springframework.web.servlet.view.JstlView"> 20 <property name="url" value=""/> 21 </bean> 22 </mvc:default-views> 23 </mvc:content-negotiation> 24 25 <!-- Registering BeanNameViewResolver and InternalViewResolver --> 26 <mvc:bean-name/> 27 <mvc:jsp prefix="/WEB-INF/jsp/" suffix=".jsp"/> 28 </mvc:view-resolvers> 29 30 <!-- Renders an XML view. Used by the BeanNameViewResolver --> 31 <bean id="vets/vetList.xml" class="org.springframework.web.servlet.view.xml.MarshallingView"> 32 <property name="marshaller" ref="marshaller"/> 33 </bean> 34 35 <oxm:jaxb2-marshaller id="marshaller"> 36 <!-- Object-XML mapping declared using annotations inside 'Vets' --> 37 <oxm:class-to-be-bound name="org.springframework.samples.petclinic.model.Vets"/> 38 </oxm:jaxb2-marshaller> 39 40 </beans>