Serving Microsoft Excel documents from WebSphere Application Server
 Technote (FAQ)
 
Problem
When setting a no-cache header, Microsoft ™ Excel documents fail to display in Microsoft Internet Explorer
 
 
Solution
When you display Excel documents using Internet Explorer, you receive an error message. The problem is that to display the document, Excel requires that the document first be cached in Internet Explorer. If the response includes a no-cache header, Internet Explorer does not cache the document, and Excel fails to display the content.

You receive these Microsoft Excel errors:




This behavior also occurs if you set the browser to not to cache a cookie.

Cache-Control: no-cache="set-cookie,set-cookie2" .

The setting of this no-cache header is recommended, as per RFC2965, whenever a cookie is set. The URL for RFC2965 is in the Related information section below.

This no-cache header is set by the Web container whenever a cookie is set using the addCookie() method. Application code can use the addCookie() method and then the Web container will drive it when setting the cookie in the case where a HttpSession is obtained by the application.

There are two ways to circumvent this problem:

  1. Include the following statement after your getSession() and addCookie() methods, because both of these methods set the no-cache value in the Cache-Control header.

     esp.setHeader("Cache-Control", "");

    or

  2. Change your addCookie() to an addHeader(). The addHeader() method does not set the no-cache value. Our experience indicates you should call addHeader() for each cookie. For example:

     resp.addHeader ("Set-Cookie","abcdef=123456789");
     resp.addHeader("Set-Cooke","Domain=.ibm.com"
 
Related information
MicroSoft Excel/IE bug

RFC 2965

 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server for z/OS > Servlet Engine/Web Container
Operating system(s): z/OS
Software version: 4.0.1
Software edition:
Reference #: 1104733
IBM Group: Software Group
Modified date: May 5, 2004