problem with showModalDialog whenever server sends a new session cookie
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()%>">
public void doPost(
throws ServletException, IOException
HttpSession session = request.getSession();
response.setHeader("Cache-Control", "no-cache"); //HTTP 1.1
response.setHeader("Pragma", "no-cache"); //HTTP 1.0
//prevents caching at the proxy server response.setContentType("application/pdf");
java.io.OutputStream outputStream = response.getOutputStream();
if (session.getAttribute("contractDocumentByteData") instanceof byte)
byte data =
if (data != null)
outputStream.write(data, 0, data.length);
I have figured out the problem here. I was using Adobe 6.0 on my machine. There are compatiblity issues between siteminder and Adobe 6.0. Adobe has fixed this issue in the patch Adobe 6.0.1. Upgrade of Adobe will resolve this issue.
By yuvrajsurvase in forum Java
Last Post: 06-01-2006, 10:02 AM
By Aditya in forum Database
Last Post: 04-29-2002, 08:39 AM
By Beginner-Brad in forum Database
Last Post: 12-31-2000, 02:03 AM
By Dan Donahue in forum Database
Last Post: 12-27-2000, 04:22 PM
By George Kayumov in forum ASP.NET
Last Post: 11-29-2000, 05:48 PM
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL