title: How to use the JasperReportsMultiFormatView with ContentNegotiatingViewResolver?
body: <p>I have html, json, and xml working fine with Spring's ContentNegotiatingViewResolver (Spring 3.2)</p>
  
  <p>Trying to get csv output using a jasperreports.</p>
  
  <p>Spring can find and parse the .jrxml file ok. Getting the following error when I try to view a .csv URL:</p>
  
  <pre><code>java.lang.ClassNotFoundException: org.springframework.ui.jasperreports.JasperReportsUtils
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
  </code></pre>
  
  <p>Here's my webmvc-config.xml (is it correct?):</p>
  
  <pre><code>&lt;bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"&gt;
          &lt;property name="useNotAcceptableStatusCode" value="true"/&gt;
          &lt;property name="order" value="1"/&gt;
  
          &lt;property name="contentNegotiationManager"&gt;
              &lt;bean class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean"&gt;
                  &lt;property name="favorPathExtension" value="true"/&gt;
                  &lt;property name="ignoreAcceptHeader" value="false"/&gt;
                  &lt;property name="mediaTypes"&gt;
                      &lt;map&gt;
                          &lt;entry key="json" value="application/json"/&gt;
                          &lt;entry key="xml" value="application/xml"/&gt;
                          &lt;entry key="csv" value="text/csv"/&gt;
                      &lt;/map&gt;
                  &lt;/property&gt;
              &lt;/bean&gt;
          &lt;/property&gt;
  
          &lt;property name="defaultViews"&gt;
              &lt;list&gt;
                  &lt;bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"&gt;
                      &lt;property name="objectMapper" ref="configuredObjectMapper"/&gt;
                  &lt;/bean&gt;
                  &lt;bean class="org.springframework.web.servlet.view.xml.MarshallingView"&gt;
                      &lt;property name="marshaller"&gt;
                          &lt;bean class="org.springframework.oxm.xstream.XStreamMarshaller"/&gt;
                      &lt;/property&gt;
                  &lt;/bean&gt;
                  &lt;bean id="parties" class="org.springframework.web.servlet.view.jasperreports.JasperReportsMultiFormatView"&gt;
                      &lt;property name="url" value="WEB-INF/parties.jrxml"/&gt;
                      &lt;property name="reportDataKey" value="dataSource"/&gt;
                  &lt;/bean&gt;
              &lt;/list&gt;
          &lt;/property&gt;
  
          &lt;property name="viewResolvers"&gt;
              &lt;list&gt;
                  &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
                      &lt;property name="order" value="2"/&gt;
                      &lt;property name="prefix" value="/WEB-INF/views/"/&gt;
                      &lt;property name="suffix" value=".jsp"/&gt;
                  &lt;/bean&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>