struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wes Wannemacher (JIRA)" <j...@apache.org>
Subject [jira] Closed: (WW-3094) http://struts.apache.org/2.0.14/docs/jasperreports-tutorial.html has wrong documentation
Date Fri, 29 May 2009 14:58:42 GMT

     [ https://issues.apache.org/struts/browse/WW-3094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Wes Wannemacher closed WW-3094.
-------------------------------

    Resolution: Won't Fix

This is a doc change request (I think?), and I think the docs are currently readable and that
optimization is unnecessary. If someone were extremely concerned with optimization, they would
know to make the necessary changes before copying/pasting code out of a tutorial.

> http://struts.apache.org/2.0.14/docs/jasperreports-tutorial.html has wrong documentation
> ----------------------------------------------------------------------------------------
>
>                 Key: WW-3094
>                 URL: https://issues.apache.org/struts/browse/WW-3094
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Documentation
>         Environment: http://struts.apache.org/2.0.14/docs/jasperreports-tutorial.html
has wrong documentation
>            Reporter: Martin Gainty
>            Priority: Minor
>
> http://struts.apache.org/2.0.14/docs/jasperreports-tutorial.html doc does'nt accomodate
getRealPath
> try {
>             JasperCompileManager.compileReportToFile(
>                     "S2_WEBAPP/jasper/our_jasper_template.jrxml",
>                     "S2_WEBAPP/jasper/our_compiled_template.jasper");
>         } catch (Exception e) {
>             e.printStackTrace();
>             return ERROR;
> instead of  "S2_WEBAPP/jasper/our_jasper_template.jrxml"
> should be:
> StringBuffer sb=ServletActionContext.getServletContext().getRealPath("S2_WEBAPP");
> //then just tack on your jrxml filename
> path1=sb.append("/jasper/scrounger_report.jrxml").toString();
> //then just tack on your our_compiled_template.jasper
> path2=sb.append("/jasper/our_compiled_template.jasper").toString();
> try {
>             JasperCompileManager.compileReportToFile(
>                    path1,
>                    path2;
>         } catch (Exception e) {
>             e.printStackTrace();
>             return ERROR;
> HTH
> MCG 21 April 2009 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message