GeeCON Prague 2014*
The moose likes Object Relational Mapping and the fly likes problem in jasperreportsxlsview using as view resolver in spring mvc Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "problem in jasperreportsxlsview using as view resolver in spring mvc" Watch "problem in jasperreportsxlsview using as view resolver in spring mvc" New topic
Author

problem in jasperreportsxlsview using as view resolver in spring mvc

Himanshu bisht bebo
Greenhorn

Joined: Jun 12, 2012
Posts: 16
Hi

i have made simple spring mvc application and In this i am generating reports through jasper reports . the files(.pdf,.xls,.html) are generated through these
4 view resolvers

org.springframework.web.servlet.view.XmlViewResolver
org.springframework.web.servlet.view.jasperreports.JasperReportsXlsView

org.springframework.web.servlet.view.jasperreports.JasperReportsPdfView

org.springframework.web.servlet.view.jasperreports.JasperReportsHtmlView

while i am able to produce view in pdf using JasperReportPdfView but i am getting problem when i use rest two views. the view is resolved to internalview resolver not to xmlviewResolver.


these is my jasper.xml content


?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.0.xsd">


<bean id="xlsReport"
class="org.springframework.web.servlet.view.jasperreports.JasperReportsXlsView"
p:url="report5.jrxml"
p:reportDataKey="datasource" />
<bean id="pdfReport"
class="org.springframework.web.servlet.view.jasperreports.JasperReportsPdfView"
p:url="customer.jrxml"
p:reportDataKey="datasource" />




<bean id="htmlReport"
class="org.springframework.web.servlet.view.jasperreports.JasperReportsHtmlView"
p:url="customer.jrxml"
p:reportDataKey="datasource" />



</beans>

I have attach all needed file In case if any one need
thanks in advance
 
jQuery in Action, 2nd edition
 
subject: problem in jasperreportsxlsview using as view resolver in spring mvc