-2

を自分に設定しdynamicjasperstruts2いますが、エラーが発生します。まず、次の jar ファイルを使用します。

DynamicJasper-4.0.3
DynamicJasper-4.0.3-javadoc
DynamicJasper-4.0.3-sources
DynamicJasper-4.0.3-tests
DynamicJasper-4.0.3-test-sources
DynamicJasper-Struts2-1.3
jasperreports-4.7.0
struts2-jasperreports-plugin-2.0.11.1-sources

<result-types> 
     <result-type name="tiles" class="org.apache.struts2.views.tiles.TilesResult" />
     <result-type name="redirectAction" 
class="org.apache.struts2.dispatcher.ServletActionRedirectResult"/>
     <result-type name="dynamic-jasper" class="ar.com.fdvs.dj.struts2.DJStruts2Result"/>
</result-types>

<action name="dynamicreport" class="ActionClass.DynamicJasperAction">
            <interceptor-ref name="defaultLoginStack"/>
            <param name="operation">showreport</param>
            <result name="SUCCESS" type="dynamic-jasper">
                 <param name="format">PDF</param>
            </result>
</action>

アプリケーションを実行すると、glass fish 3+ 出力ウィンドウに次のエラーが表示されます。

INFO: ERROR  (org.apache.struts2.dispatcher.Dispatcher:38) - Dispatcher initialization failed
Unable to load configuration. - action - file:/G:/Project/IG/LIMSs/build/web/WEB-INF/classes/struts.xml:2996:78

Caused by: There is no result type defined for type 'dynamic-jasper' mapped with name 'SUCCESS'.  Did you mean 'dynamicJasper'? - result - file:/G:/Project/IG/LIMSs/build/web/WEB-INF/classes/struts.xml:2999:58
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.buildResults(XmlConfigurationProvider.java:645)
    at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:379)
    ... 57 more

INFO: WEB0671: Loading application [IMsys] at [/LIMSs]
INFO: IMsys was successfully deployed in 71,796 milliseconds.
WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
The Struts dispatcher cannot be found.  This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]

ブラウザのエラーは次のとおりです。

exception
org.apache.jasper.JasperException: The Struts dispatcher cannot be found.  This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]
root cause
The Struts dispatcher cannot be found.  This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]

動的ジャスパーの設定方法がわかりません。アドバイスいただけますか?

4

1 に答える 1

0

DynamicJasper-4.0.3-test.jar の代わりに DynamicJasper-4.0.3-test-sources.jar をダウンロードするだけで問題が解決します。

于 2013-04-09T10:03:33.853 に答える