[
https://issues.apache.org/jira/browse/WW-5732?focusedWorklogId=1043776&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1043776
]
ASF GitHub Bot logged work on WW-5732:
--------------------------------------
Author: ASF GitHub Bot
Created on: 24/Sep/26 16:04
Start Date: 24/Sep/26 16:04
Worklog Time Spent: 10m
Work Description: lukaszlenart opened a new pull request, #341:
URL: https://github.com/apache/struts-site/pull/341
Matches apache/struts#1922
([WW-5732](https://issues.apache.org/jira/browse/WW-5732)), fixed in 7.4.0.
`JasperReport7Result` now retries the exporter lookup with the lower-cased
`format` when there is no exact match, so `CSV` selects the bundled `csv`
exporter. The JasperReports 7 page said the value was case-sensitive and that
6.x upper-case values no longer work. Both statements are now true only of
7.3.0 and earlier.
- **Usage, `format` parameter:** describes the lower-case retry since 7.4.0
and notes that 7.3.0 and earlier match case-sensitively.
- **Migrating from the JasperReports plugin:** lower-case is still
canonical; upper-case 6.x values resolve since 7.4.0 and are rejected by 7.3.0
and earlier.
The custom exporters section is unchanged: a custom provider name still
matches exactly first, so it remains a valid `format` value.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Issue Time Tracking
-------------------
Worklog Id: (was: 1043776)
Time Spent: 50m (was: 40m)
> JasperReport7Result Javadoc example uses upper-case format "CSV" which fails
> the exporter lookup
> ------------------------------------------------------------------------------------------------
>
> Key: WW-5732
> URL: https://issues.apache.org/jira/browse/WW-5732
> Project: Struts 2
> Issue Type: Bug
> Components: Plugin - JasperReports
> Reporter: Lukasz Lenart
> Assignee: Lukasz Lenart
> Priority: Trivial
> Fix For: 7.4.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> The class Javadoc of {{JasperReport7Result}} (snippet {{example1}}) shows
> {code:xml}<result name="success" type="jasperReport7">
> <param name="location">foo.jasper</param>
> <param name="dataSource">mySource</param>
> <param name="format">CSV</param>
> </result>
> {code}
> but the result resolves the exporter with
> {code:java}invocation.getInvocationContext().getContainer().getInstance(JasperReport7ExporterProvider.class,
> format)
> {code}
> and the providers are registered in {{struts-plugin.xml}} under the
> lower-case names {{pdf}}, {{csv}}, {{html}}, {{xlsx}}, {{xml}}, {{rtf}} (the
> values of {{JasperReport7Constants.FORMAT_*}}). The container lookup is
> case-sensitive and {{format}} is never lower-cased, so copying the example
> gives {{StrutsException: No exporter found for format: CSV}}.
> The 6.x plugin used upper-case constants ({{FORMAT_CSV = "CSV"}}), which is
> presumably where the example came from.
> Either fix the example to {{csv}} and state in the {{format}} parameter
> description that the value is case-sensitive, or lower-case {{format}} in
> {{initializeProperties}} so both spellings work; the second also eases
> migration from the 6.x plugin. The site page added in WW-5728 documents the
> lower-case values.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)