In our application we display a pdf to the user in a modal dialog whenever he clicks on the view button. We use siteminder for authentication.

Only on certain machines we sporadically get a blank modal dialog instead of the pdf. I used HttpAnalyzer to check on the HTTP requests and response. I found that whenever in case of a call to DisplayPDFServlet(see the code below to understand the calls) the siteminder does a "Set-Cookie" in the response, I get a blank modal dialog and the Response content is empty.

I tried to match my IE setting with the machines which do not have this problem, but it has been of no use.

The view action is handled in the code as follows:
1. Call a struts action class which fetches the pdf and puts it in session.
2. In the jsp to which the control is now directed to, we have an object tag wherein the value is a call to a servlet which gets the pdf from the session and writes it to the outputstream

Object tag in the jsp:
<object id="demo" classid="clsid:CA8A9780-280D-11CF-A24D-444553540000" width="750" height="530">
<param name="SRC" value="servlet/com.dcs.century21.display.util.DisplayPDFServlet?<%=System.currentTimeMillis()%>">
Servlet Code

public void doPost(
HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
HttpSession session = request.getSession();
response.setHeader("Cache-Control", "no-cache"); //HTTP 1.1
response.setHeader("Pragma", "no-cache"); //HTTP 1.0
response.setDateHeader("Expires", 0);
//prevents caching at the proxy server response.setContentType("application/pdf");
response.setHeader("Content-Type", "application/pdf");
java.io.OutputStream outputStream = response.getOutputStream();
if (session.getAttribute("contractDocumentByteData") instanceof byte[])
byte[] data =
(byte[]) session.getAttribute("contractDocumentByteData");
if (data != null)
outputStream.write(data, 0, data.length);

Please Help!!!