spring mvc 引用 jasper JasperReportsHtmlView的nullpx图片问题
spring mvc 引用 jasper JasperReportsHtmlView的nullpx图片问题
参考:http://stackoverflow.com/questions/11686332/nullpx-in-jasperreport-html-view
注意:http://my.oschina.net/x2space/blog/74375
注意:http://www.cnblogs.com/love540376/articles/4494921.html
<bean id="KdQtMlPrint" class="org.springframework.web.servlet.view.jasperreports.JasperReportsHtmlView"> <property name="url" value="/WEB-INF/jasper/KdQtMlPrint.jasper"></property> <property name="exporterParameters"> <map> <entry key="net.sf.jasperreports.engine.export.JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN"> <value>false</value> </entry> </map> </property> </bean>
JasperReportsHtmlView的中文乱码问题解决,这个需要看org.springframework.web.servlet.view.jasperreports.AbstractJasperReportsView源码了:
<bean id="KdQtMlPrint" class="org.springframework.web.servlet.view.jasperreports.JasperReportsHtmlView"> <property name="url" value="/WEB-INF/jasper/KdQtMlPrint.jasper"></property> <property name="exporterParameters"> <map> <entry key="net.sf.jasperreports.engine.export.JRHtmlExporterParameter.IS_USING_IMAGES_TO_ALIGN"> <value>false</value> </entry> </map> </property> <property name="headers"> <props> <prop key="content-type">text/html;charset=UTF-8</prop> <prop key="character-encoding">UTF-8</prop> </props> </property> </bean>