Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » pdf emitter gives an "Internet Explorer cannot display the webpage" with IE 8 and https
pdf emitter gives an "Internet Explorer cannot display the webpage" with IE 8 and https [message #817093] Fri, 09 March 2012 16:22 Go to next message
Jean-Philippe Torunski is currently offline Jean-Philippe TorunskiFriend
Messages: 2
Registered: March 2012
Junior Member
We solved a big problem and to save people time I thought that I'd post the solution.

None of the reports generated in PDF format were showing up in IE 8 when the https protocol was used. Worked fine with http. Also worked fine with any other browser.

The problem goes beyond BIRT but basically if the "Cache-Control" header is being set to "no-cache" you need to change it to something like "Cache-Control: private,pre-check=0,post-check=0"

What should happen is that IE saves the file to disk and then calls the PDF plugin to read the file. However because caching is turned off and it's an encrypted page IE doesn't store the file at all, so by the time that the pdf plugin tries to read the file it can't.

Also make sure you uncheck "do not save encrypted pages to disk" in the advanced tab of internet options if this is checked.

In order to fix it I just set a filter in my web app to set the header appropriately after the filter chain has processed it:

public void doFilter(ServletRequest request, ServletResponse response,
			FilterChain chain) throws IOException, ServletException {
  chain.doFilter(request, response);
  if(request.getParameter("__report") != null &&
    ("pdf".equals(request.getParameter("__format")) || 
     "xls".equals(request.getParameter("__format")))) { 
     ((HttpServletResponse)response)
       .setHeader("Cache-Control:", "private,pre-check=0,post-check=0");
   }
}



This likely will affect the excel emitter too although I haven't tested.
Re: pdf emitter gives an "Internet Explorer cannot display the webpage" with IE 8 and http [message #817150 is a reply to message #817093] Fri, 09 March 2012 18:02 Go to previous messageGo to next message
Jean-Philippe Torunski is currently offline Jean-Philippe TorunskiFriend
Messages: 2
Registered: March 2012
Junior Member
Another wrinkle with Tomcat:
If you set any <security-constraint> in your web.xml then Tomcat will add the Cache-Control to no-cache. You also need to update your context.xml to include:
 <Valve className="org.apache.catalina.authenticator.FormAuthenticator" securePagesWithPragma="false" />
Re: pdf emitter gives an &quot;Internet Explorer cannot display the webpage&quot; with IE 8 [message #817274 is a reply to message #817150] Fri, 09 March 2012 21:53 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Jean-Philippe

Very useful information.
Thanks for posting this!

Jason

On 3/9/2012 1:02 PM, Jean-Philippe Torunski wrote:
> Another wrinkle with Tomcat:
> If you set any <security-constraint> in your web.xml then Tomcat will
> add the Cache-Control to no-cache. You also need to update your
> context.xml to include:
> <Valve className="org.apache.catalina.authenticator.FormAuthenticator"
> securePagesWithPragma="false" />
>
Previous Topic:can you update the derby core plugin version?
Next Topic:Serial Numbers
Goto Forum:
  


Current Time: Thu Mar 28 17:53:12 GMT 2024

Powered by FUDForum. Page generated in 0.03083 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top