*
The moose likes Struts and the fly likes Urgent! Strange problem when calling jasper report in STRUTS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Urgent! Strange problem when calling jasper report in STRUTS" Watch "Urgent! Strange problem when calling jasper report in STRUTS" New topic
Author

Urgent! Strange problem when calling jasper report in STRUTS

Michael Zohner
Greenhorn

Joined: Nov 24, 2004
Posts: 9
Urgent! Strange problem when calling jasper report from STRUTS
Hi,

I have a problem when calling a jasper report from Struts and I have no idea what I am doing wrong.

I get a "java.lang.IllegalStateException: Cannot forward after response has been committed" exception!

My code is below...
Action:
// I pass a list with one map to this "prepareReportJrxml" method

AbstractBaseReportBean:


exportReportPlainXls method:


at this point I get the error:
AbstractBaseReportBean:


I dont know how to eliminate this error.
I think, this is also the reason why no data will be passed to the excel sheet (I think).

Thanks a lot ! cheers
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

http://faq.javaranch.com/java/EaseUp

Actions that write their own response should return "null" (not an ActionForward) so the framework doesn't attempt to continue processing the request.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Urgent! Strange problem when calling jasper report in STRUTS
 
Similar Threads
JasperReports in webapp (JSF2)
Call report using JSF and Jasper Reports
Exception while writing to output stream
HTML generated by backing bean
how to trigger a servlet from JSF