struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas De Loof" <>
Subject Re: Action without forward ?
Date Thu, 16 Jan 2003 09:47:55 GMT

perform() method in any action MAY return an ActionForward, but CAN return
null if it has build the response for the client browser. This is commonly
used for PDF or Excel generation, where they're is no need for a JSP.

I don't understand why you cannot directly use the PDF-generator servlet, by
adding a dedicated mapping in your web.xml.


> Hi, I am using Struts 1.02 and got the following Problem:
> I need to create a JSP where u can select to create a pdf or excel file.
> The problem is, I didn't programm the Action to create the file, a
> colleague did.
> So I need some way to call his Servlet. I tried to map directly to it,
> that did not work. So I wrote an Action that called a method to create
> this pdf / excel file,
> depending on the parameters given.
> The problem is, that after this method there is no forward anymore, as
> the control is given to the servlet
> to create the file, and thats it. But the
> public ActionForward perform(
> ActionMapping mapping,
> ActionForm form,
> HttpServletRequest request,
> HttpServletResponse response)
> {
> needs some forward.
> For the moment I wrote "return null" but imho thats no prober solution.
> Maybe you got an idea.
> thanks,
> marcus

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message