Back Forum Reply New

Jasper Reports View Issue

Hello,

I am taking over an existing Spring application and I am having difficulty getting jasper reports to work.

Project Details:

Spring Version: 2.0
Jasper Reports: 1.3.0

I can see from the server output that the reports are being compiled when the application starts up but instead of rendering the jasper report view, the application attempts to point to the jsp view.

From the servlet-config.xml file:Code:

lt;bean id=quot;beanNameViewResolverquot;         class=quot;org..web.servlet.view.BeanNameViewResolverquot;/gt;      lt;bean id=quot;internalResourceViewResolverquot;         class=quot;org..web.servlet.view.InternalResourceViewResolverquot;gt;       lt;property name=quot;prefixquot;gt;lt;valuegt;/WEB-INF/jsp/lt;/valuegt;lt;/propertygt;       lt;property name=quot;suffixquot;gt;lt;valuegt;.jsplt;/valuegt;lt;/propertygt;   lt;/beangt;      lt;bean id=quot;beanNameuclMappingquot;         class=quot;org..web.servlet.handler.BeanNameuclHandlerMappingquot;gt;       lt;property name=quot;interceptorsquot;gt;lt;listgt;    lt;ref bean=quot;openSessionInViewInterceptorquot;/gt;    lt;ref bean=quot;setCurrentStaffInSessionInterceptorquot;/gt;    lt;ref bean=quot;setSelectedObjectsInSessionInterceptorquot;/gt;lt;/listgt;       lt;/propertygt;   lt;/beangt;      lt;bean id=quot;methodNameResolverquot; class=quot;org..web.servlet.mvc.multiaction.ParameterMethodNameResolverquot;gt;       lt;property name=quot;paramNamequot;gt;lt;valuegt;actionlt;/valuegt;lt;/propertygt;   lt;/beangt;

...
lt;bean name=quot;printDataInformationFormquot;         class=quot;org..web.servlet.view.jasperreports.JasperReportsPdfViewquot;gt;       lt;property name=quot;reportDataKeyquot;gt;lt;valuegt;datalt;/valuegt;lt;/propertygt;       lt;property name=quot;uclquot;gt;lt;valuegt;/WEB-INF/jasper/dataInformationForm.jrxmllt;/valuegt;lt;/propertygt;           lt;/beangt;
the printDataInformationForm view attempts to go to:
WEB-INF/jsp/dataInformationForm.jsp and errors out (404).

I don't understand what is missing.  This is running in a production server properly but on my local machine running tomcat 6 I get the 404 error.  

Thanks,

Chris.

Figured it out, it required order to be set on beanNameViewResolver:Code:
lt;bean id=quot;beanNameViewResolverquot;         class=quot;org..web.servlet.view.BeanNameViewResolverquot;gt;         lt;property name=quot;orderquot; value=quot;0quot;/gt;   lt;/beangt;
¥
Back Forum Reply New