Search This Blog

Showing posts with label issue. Show all posts
Showing posts with label issue. Show all posts

Friday, October 18, 2013

To make JSP compatible with IE8 or IE 9

Add the following code to the javascript block.

#if ($browserSniffer.getMajorVersion($request) < 9)
  <meta http-equiv="X-UA-Compatible" content="IE=8" />
#else
  <meta http-equiv="X-UA-Compatible" content="IE=9" />
#end

this will make the jsp compatible with IE 8 or IE 9

Happy Coding !!

 

Wednesday, September 11, 2013

Unable to download documents from Document Library

This is one of the showstopper issue which people face when they use Liferay 6.1.20 EE GA2 with SSH. and IE 8,7 as the browser. While it works on other browsers like Firefox.The documents from the document library are not available.

Reason:

When the server uses SSL (https os Secure Socket Layer). The apache adds the following to the http headers.

Pragma: no-cache
Cache-control: no-cache,max-age=0,must-revalidate


The IE Browser is  not allowed to store the document in the local system and thus it fails to download the object.

refer:
response.setHeader( HttpHeaders.CACHE_CONTROL, HttpHeaders.CACHE_CONTROL_PUBLIC_VALUE);

present in the classes ServletResponseUtil, PortletResponseUtil.

Here is a link to the microsoft support , which explains the browser issue .
http://support.microsoft.com/default.aspx?scid=kb;en-us;316431

Solution:

Solution 1. Override the code of the classes ServletResponseUtil, PortletResponseUtil. in the setHeaders(request, response, fileName, contentType) method.

                           (or)

solution 2. Add the following line to the apache config file.


        Header unset Pragma

This will remove the pragma entry from the header and the issue would be solved. 






My Blog List