I am so sorry that i forgot the code snipped...

public ActionForward execute(ActionMapping mapping, ActionForm form, 
HttpServletRequest request, HttpServletResponse response) throws IOException, 
ServletException
  {
     HttpSession session = request.getSession();   
     TespitSozForm frm =(TespitSozForm)form;
     MessageResources messageResource = 
MessageResources.getMessageResources("mypackage1.ApplicationResources");
     ByteArrayOutputStream baos = 
ygmsPDF.createPdfFromSozNo(frm,messageResource);
       
      response.reset();
      response.setHeader("Content-Disposition","inline;filename=" + 
frm.getSozNo() + ".pdf");
      response.setHeader("Expires","0");
      response.setHeader("Cache-Control","must-revalidate, post-check=0, 
pre-check=0");
      response.setHeader("Pragma","public");
      response.setContentType("application/pdf");
      
      response.setContentLength(baos.size());
      ServletOutputStream out = response.getOutputStream();
      baos.writeTo(out);
      out.flush();
      out.close();
    
    return null;
  }



-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to