title: In a Struts Action, can I write out a byte array as well as redirect the page? (Struts 1, Java)
body: <p>I'm working on a project in which, after the user submits a form, I'd like to have them download a PDF file (filled out with information from the form) as well as redirect them to another page. I know how to redirect (returning an <code>ActionForward</code> which is set up to redirect to the correct JSP) and I know how to send the PDF (I build it using iText library, then write the byte array out to the <code>HttpServletResponse</code>'s output stream), but I'm not sure how to do both without some sort of kludge. </p>
  
  <p>I'm guessing I'll have to do one of the two using javascript/ajax, but I was wondering if there is a more elegant way to do this with struts.</p>