I am using doing one project in that i want to show report as pdf, I was using content type as application/pdf in page directive but it did not work please tell me how to display jsp as pdf.
What did you expect it to do? What do you have your browser configured to do?
santhosh kumar vk
Ranch Hand
Joined: Aug 25, 2009
Posts: 115
posted
0
hi
I am using code like struts <logic:iterator> and <bean:write> in jsp it will show some collection it is opening in browser but it should open in pdf how to open
please tell me.
What you are using (Struts, and so on) is irrelevant. The browser will handle the PDF in that manner in which it was configured to do so.
The only other control you have over the situation is setting the content-disposition header. Search for information on that header and see if you can get the behavior you want. If not, then it's a matter of browser configuration.
You'll also want to actually output PDF. I get the feeling that you are outputting HTML and expecting something at the client side to display that in PDF format. It doesn't work that way.