This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

problem in jasperreportsxlsview using as view resolver in spring mvc

 
Himanshu bisht bebo
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic