You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by hns <ha...@yahoo.com> on 2008/03/04 11:11:26 UTC
JasperReports problem
i am trying to use jasper report functionality from document of strtus
2.0.11
after creating person.java at com.mevipro.test
and com.mevipro.test.action.JasperAction and
our_jasper_template.jrxml
i have write in strtus.xml
<action name="myJasperTest"
class="com.mevipro.test.action.JasperAction">
<result name="success" type="jasper">
/jasper/our_compiled_template.jasper
myList
PDF
</result>
</action>
-------------------------
while i try to run index.jsp it shows error message of http status 404 file
not found
what is problem
--
View this message in context: http://www.nabble.com/JasperReports-problem-tp15824149p15824149.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] Re: JasperReports problem
Posted by Dave Newton <ne...@yahoo.com>.
--- hns <ha...@yahoo.com> wrote:
> result type error undefined
>
> try {
> JasperCompileManager.compileReportToFile(
> "jasper/our_jasper_template.jrxml",
> "jasper/our_compiled_template.jasper");
> } catch (Exception e) {
> e.printStackTrace();
> return ERROR;
> }
> return SUCCESS;
> }
>
> i could not understand why error come
Probably because there was an exception during your Jasper compilation, so
ERROR was returned, and you don't have a "error" result defined.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] Re: JasperReports problem
Posted by hns <ha...@yahoo.com>.
yes after understanding my mistake i have added
all commons-* .jar and got another error at
<action name="myJasperTest" class="com.mevipro.test.action.JasperAction">
result type error undefined
because
i have
try {
JasperCompileManager.compileReportToFile(
"jasper/our_jasper_template.jrxml",
"jasper/our_compiled_template.jasper");
} catch (Exception e) {
e.printStackTrace();
return ERROR;
}
//if all goes well ..
return SUCCESS;
}
in JasperAction.java
i could not understand why error come
--
View this message in context: http://www.nabble.com/JasperReports-problem-tp15824149p15826154.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
[OT] Re: JasperReports problem
Posted by Dave Newton <ne...@yahoo.com>.
--- hns <ha...@yahoo.com> wrote:
> This problem solved using done
> ----------------------------------------
> <package name="jasperrpt" extends="jasperreports-default" namespace="/">
> <action name="myJasperTest" class="com.mevipro.test.action.JasperAction">
> <result name="sucess" type="jasper">
> /jasper/our_compiled_template.jasper
> myList
> PDF
> </result>
> </action>
> </package>
> ------------------------------------------
> but it gives another error while executing action
>
> java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
Include the digester library :|
Did you look at the required libraries for Jasper?
http://www.jasperforge.org/jaspersoft/opensource/business_intelligence/jasperreports/requirements.html
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: JasperReports problem
Posted by hns <ha...@yahoo.com>.
This problem solved using done
----------------------------------------
<package name="jasperrpt" extends="jasperreports-default" namespace="/">
<action name="myJasperTest" class="com.mevipro.test.action.JasperAction">
<result name="sucess" type="jasper">
/jasper/our_compiled_template.jasper
myList
PDF
</result>
</action>
</package>
------------------------------------------
but it gives another error while executing action
java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester
net.sf.jasperreports.engine.JasperCompileManager.compileReportToFile(JasperCompileManager.java:116)
com.mevipro.test.action.JasperAction.execute(JasperAction.java:47)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)
--
View this message in context: http://www.nabble.com/JasperReports-problem-tp15824149p15825432.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org