Hi Folks, Does anybody has code snippets for sending the responds to the client in pdf format from servlets. As i know , the mime type has to be as application/pdf in the response header but i really don't know how to implement this. Thanks in advance. regs Fred
Hi, Thanks for the response. But how do i send the file to the client. Do i have to obtain the outputstream associated with the client and write the raw binary data on the socket connection stream. I've a doubt in this. Could you please clarify me with a sample code if possible. Thanks in advance.
Joined: Jan 23, 2002
Yes, you need to use the OutputStream object available through the HttpServletResponse. Here's a code example. Note that I haven't compiled it though.