下载此文档

struts2报表开发().doc


文档分类:IT计算机 | 页数:约21页 举报非法文档有奖
1/21
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/21 下载此文档
文档列表 文档介绍
struts2报表开发()
Install JasperReports plug ins
The strange thing is that the struts- in the JasperReports plug-in does not inherit the struts-default package.
Modify to make inheritance struts-default package.
< XML version= "1" encoding= "UTF-8"? >
<! DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration //EN""
"Http://struts./dtds/struts-" >
<struts>
<package name=, "jasperreports-default", "extends=", "struts-default" >
<result-types>
<result-type name= "Jasper" class= "" / >
</result-types>
</package>
</struts>
======================================
One, --
Package lee;
.;
Import .*;
Public class JasperAction extends ActionSupport
{
Public List getBookList ()
{
List result = new ArrayList ();
(New Book (1), " book", "Li Gang");
(New Book (2), lightweight J2EE enterprise bat, "Li Gang");
(New Book (3), "J2EE based Ajax collection", "Li Gang");
Return result;
}
}
-
Two, configure JasperAction--
< XML version= "1" encoding= "GBK"? >
<! DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration //EN""
"Http://struts./dtds/struts-" >
<struts>
<constant name= "" value= "messageResource" / >
<constant name= "" value= "GBK" / >
<package name=, "Lee", "extends=", "jasperreports-default" >
<action name=, "export", "class=", "" >
<result name=, "ess", "type=", "Jasper" >
<param name= "location" >jasper\</param>
<param name= "format" >HTML</param>
<param name= "dataSource" >bookList</param>
</result>
</action>
</package>
</struts>
----
1, when Result is Jasper type, three attributes need to be configured.
Location specifies the location of file used to generate the report. In the root directory of the

struts2报表开发() 来自淘豆网www.taodocs.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数21
  • 收藏数0 收藏
  • 顶次数0
  • 上传人rjmy2261
  • 文件大小22 KB
  • 时间2017-11-23