struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From RobinCamus <rca...@docsea.com>
Subject Re: result type Jasper [Struts 2]
Date Thu, 07 Jun 2007 12:20:39 GMT

I saw your others post so if i understand correctly, you want to use
jasperreports so here is what i ve done:
in struts.xml:
-<!-- Configuration for the default package. -->
-<package name="default" extends="struts-default">
-	<result-types>
-		<result-type name="jasper"
class="org.apache.struts2.views.jasperreports.JasperReportsResult" />
-	</result-types>
-
-...
-...
-...
-...
-       <action name="reportMaintenanceHistoryPDF"
class="maintenanceHistoryQueryAction" method="search">
-		<result name="success" type="jasper">
-				WEB-INF/pages/reports.jasper/maintenance_report.jasper
-				maintenanceHistoryQueryList
-				PDF
-		</result>
-        </action>
-...
-...
-</package>

actually if you re using jasperreports,
org.apache.struts2.views.jasperreports.JasperReportsResult is the good class
for the result class.
WEB-INF/pages/reports.jasper/maintenance_report.jasper is your precompiled
rapport (i ve build them with ireports)
maintenanceHistoryQueryList is the list with the data you need for your
report

you can find all those information on jasperreports forum...

Robin


honey0303 wrote:
> 
> still i got the error even if i include that in my default package..
> 
> e.g.
> 
> <struts>
> 
>     <package name="eis-default" namespace="/" extends="struts-default">
>         
>            <result-types>
>            <result-type name="jasper"
> class="org.apache.struts2.views.jasperreports.JasperReportsResult" />
>             </result-types> 
> ...
> 
> 
> still have same error..
> 
> what you mean by this..
> 
> You ll have to find the result class you need to point at..
> 
> i am really new at Struts..please help me..thanks again.
> 
> 
> 
> 
> RobinCamus wrote:
>> 
>> I had to implement a jasper type for jasper report:
>> I think you need to define a result type in struts.xml like
>> <!-- Configuration for the default package. -->
>> <package name="default" extends="struts-default">
>>     <result-types>
>> 	   <result-type name="jasper"
>> class="org.apache.struts2.views.jasperreports.JasperReportsResult" />
>>    </result-types>
>>    ....
>> </package>
>> 
>> You ll have to find the result class you need to point at.
>> I hope it helps
>> 
>> Robin
>> 
>> 
>> honey0303 wrote:
>>> 
>>> Hi i'm trying to integrate jasper with struts 2..but i got an error
>>> because of my result type jasper 
>>> 
>>> i've followed this tutorial..
>>> 
>>> <action name="myJasperTest"
>>> class="com.mevipro.test.action.JasperAction">
>>> 	<result name="success" type="jasper"/>
>>> </action>
>>> 
>>> my question is how can i defined a jasper result type? 
>>> i need answers ASAP..Thanks in advance 
>>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/result-type-Jasper--Struts-2--tf3882770.html#a11006929
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


Mime
View raw message