-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Guilherme,
Guilherme Orioli wrote: | Yes, it's an EJB managed by the JSF config faces-config.xml . Should I use a | different servlet to get the result wanted? The problem is that you are using an EJB to manipulate the HTTP request and response. You shouldn't do that. Fill the EJB with whatever data you need from the request, tell it to generate the PDF, and then ask it where the new PDF was written on the disk (or, you could even ask for an InputStream to it, if you want to hide the location from the servlet). The servlet should do all the work with the request and response. Get that stuff out of your EJB. It'll be a lot easier to test that way. | Is this code right, i mean, should it show the download dialog (or even the | PDF screen). If you always want to show a download dialog, you'll need to set a few new headers. Search the web for "Content-Disposition" and "attachment". You'll find stuff like this: http://classicasp.aspfaq.com/general/how-do-i-prompt-a-save-as-dialog-for-an-accepted-mime-type.html Otherwise, the PDF will be displayed in the browser's content ares instead of being downloaded (unless the user chooses "Save Page As..." from the file menu, of course). - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkf2LdoACgkQ9CaO5/Lv0PDwpwCgtVaGmKReiCAC1yoxMa370z9A FeEAn2L1k13zu5XAHZo2cCMMP7Qx6O4L =8EPy -----END PGP SIGNATURE----- --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]