wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Problem in Include a url in IE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Problem in Include a url in IE "Access denied"" Watch "Problem in Include a url in IE "Access denied"" New topic
Author

Problem in Include a url in IE "Access denied"

Aniruddha Jadhao
Greenhorn

Joined: May 10, 2006
Posts: 24
Hello All,

I am including a page(url) in iframe in a jsp but I am getting access denied error in IE 9. However for the same , its working in chrome.

The url I have is of a 3rd party website which I need to include in iframe in my jsp page , the url has query parameters of username and password provided by me dynamically. Using these username and password , the 3rd party website makes the user login . After logging in the eventual landing page is expected to get displayed in iframe .

I want to achieve this in IE only but its failing in IE only and working for other of the browsers like chrome , firefox.

Can any one please suggest me a way to achieve this or whats wrong in the method above ?

Thanks.
P.S. I have tried including the url in Object tag instead of iframe but the behaviour is same as above i.e. its working in chrome but not in ie.
Later I tried including another jsp as a source of iframe. in this jsp , on load I ran a dynamic form creation and submission to the url , but no luck.
Rob Crowther
author
Ranch Hand

Joined: Nov 06, 2012
Posts: 295
    
    5

What is the 3rd party website setting the value of the X-Frame-Options header to?


Read my books: Hello! HTML5 & CSS3 | HTML5 in Action | Read my blog
Aniruddha Jadhao
Greenhorn

Joined: May 10, 2006
Posts: 24
Would the value of this option matter? Because the options i.e. SAMEORIGION or ALLOW FROM ,I guess , will not work in my case. The reasons are
1) my website and 3rd party website is on different domain
2) The 3rd party website I am accessing is deployed individualy for differnt ips that I will be passing while constructing the url. I construct the url dymanically with three parameters IP,username,Password.
Please share your thoughts on same or any alternative solution for the same.
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
How are you setting the iframe?
Rob Crowther
author
Ranch Hand

Joined: Nov 06, 2012
Posts: 295
    
    5

Aniruddha Jadhao wrote:Would the value of this option matter?


Since some of the options are only supported in IE among released browsers, and IE is the only browser you have a problem in, I'm guessing that yes it does.
Aniruddha Jadhao
Greenhorn

Joined: May 10, 2006
Posts: 24
I am setting iframe in a HTML div in my jsp.

Here is the snippet of the code . I am using jquery javascript framework.

$("#config-info")[0].innerHTML="<iframe name='ani' id='ani' height='800px' width='800px' src='https://x.x.x.x/a.php/?Login=abcd&Password=efgh' />";

I just wonder when I run this code in Google chrome , its runs perfectly , only in IE this problem occurs.
Aniruddha Jadhao
Greenhorn

Joined: May 10, 2006
Posts: 24
Even though we got to know the values of X-FRAME-OPTIONS set in 3rd party website , will it be possible to include/embed the url in iframe in of jsp. I read that X-FRAME-OPTIONS have only two options
i.e. DENY /SAMEORIGION . Two websites are on two different domains so SAMEORIGION will also not work , I believe?
Aniruddha Jadhao
Greenhorn

Joined: May 10, 2006
Posts: 24
I have tried to use <object in place of iframe but same result >
Aniruddha Jadhao
Greenhorn

Joined: May 10, 2006
Posts: 24
The third party url is a https website and its security certificate is expired , would it be the cause for "Access denied" error?



[Thumbnail for error.jpg]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in Include a url in IE "Access denied"
 
Similar Threads
JS Error ACCESS IS DENIED when submitting the form in jsp file through javascript
Browsers and Their Back Buttons.
is there any alternative for iframe?
How to navigate through a web page displayed in iframe ?
How do I enable cookie for third party website in IE from java