struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick J Kobly <patr...@kobly.com>
Subject Re: Struts 2 Jasper Reports Plugin
Date Tue, 10 Apr 2007 14:48:36 GMT
You probably want st like:

<package name="jasper" extends="jasperreports-default,struts-default">

The problem is that the servlet request is set by an interceptor 
(servlet-config) that is in the default stack defined in 
struts-default.  The jasperreports-default package does not define any 
interceptor stacks, and does not extend any other packages.

PK

ChristopherAngel wrote:
> Apparently using HttpServletRequest request =
> ServletActionContext.getRequest();
>
> So why is the setServletRequest method not called?
>
>
> ChristopherAngel wrote:
>   
>> I have the following package defined in my struts.xml file:
>>
>> <package name="jasper" extends="jasperreports-default">    
>>   <action name="getReport" class="com.action.ReportAction"
>> method="generateReport">
>>     <result name="success" type="jasper">        
>>       <param name="location">reports/report.jasper</param>
>>       <param name="dataSource">dataSource</param>
>>     </result>
>>   </action>
>> </package>
>>
>> the generateReport method is called as expected except despite
>> ReportAction implementing ServletRequestAware the setServletRequest method
>> is never called.  
>>
>> How can I get access to the HttpServletRequest object from within the
>> generateReport method?
>>
>>
>>
>>     
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message