I am new to portlet environment. My aim is to let the PDF open at user's end/make him save it.
As portal sets the content type (e.g, text/html) and encoding as the portal page starts rendering. In my case, the setContentType() would be useless since the servlet container won't let me change it. I can either use a popup browser window for the pdf as, or use an iframe if I want to render the pdf inside the portlet window.
This is my present code, but it is not good enough to do the above thing.
Please guide me in this, as I am not knowing how to do it?? Thanks & Regards, Saurabh.
You cannot push binary in portlet like you do in web application. What you have to do is to generate the PDF on the server and pass the path info to the portlet so that it can read the pdf as a normal client. you might have to use the <EMBED> tag to display the pdf in the portlet.
If you had used WebSphere portal, the document viewer portlet comes out of the box, but looks like you are using liferay. But its easy, you should be able to achieve the functionality. [ December 01, 2007: Message edited by: Sanjay Kannan ]
Joined: Nov 15, 2007
Hi Sanjay, Thanks for this information, I will surely try this and update you. Thanks, Saurabh.