File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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.
I agree. Here's the link:
subject: ActionForward after Excel display
jQuery in Action, 3rd edition