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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to