This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Struts and the fly likes ActionForward after Excel display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "ActionForward after Excel display" Watch "ActionForward after Excel display" New topic

ActionForward after Excel display

Stephanie Johnson

Joined: Jun 03, 2009
Posts: 8
I am using struts 1.3.8. I have a simple JSP page with a button, the click of which generates an Excel file. Inside my action class, I write the excel file to response's output stream. I dont want my ActionForward to redirect me anywhere. I just want to stay on the same JSP page that requested for the Excel file.

I tried redirecting my ActionForward to null, but I am getting an exception while doing that. Any thoughts?
David Newton

Joined: Sep 29, 2008
Posts: 12617

I'm not sure what "redirecting an ActionForward to null" means, but you should be able to return null from the action to prevent further Struts processing of the response.
Consider Paul's rocket mass heater.
subject: ActionForward after Excel display
It's not a secret anymore!