aspose file tools*
The moose likes JSP and the fly likes Gives Access Denied when printing PDF report which is in another frame. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Gives Access Denied when printing PDF report which is in another frame." Watch "Gives Access Denied when printing PDF report which is in another frame." New topic
Author

Gives Access Denied when printing PDF report which is in another frame.

Ashwani Yadav
Greenhorn

Joined: Apr 21, 2002
Posts: 1
Hi,
I am trying to print the another frame by specifying the name of the
frame,and in that frame I am generating a report in PDF/HTML.
But It gives access is denied error.
what I am doing is in Javascript is as follows:
function printReport()
{
window.parent.Main.focus();
window.parent.Main.print();
}
where Main is my second frame on which my report is generated.
I am using Web logic server for my JSP pages and for reports Oracle Report writer 6i.
I also tried it by placing both my reports and JSP page(in which I have written a script) on the same machine,but my prob remains as it is.

So If You have any idea about the error, just inform me urgently.
--------------
Ya you r right its the problem of security,but have u any idea how can i change the security at client side as this error comes from the javascript written for client side validation.
[ April 24, 2002: Message edited by: Ashwani Yadav ]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

If you are referring to the Javascript "access denied" error, this can occur when a page tries to access a frame that contains a page served up from a different server. This is not allowed (think of the security implications).
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61066
    
  66

If this is indeed the case (in which a page on one domain wants to load a page from another into a peer frame), one way around this could be to write a servlet or JSP that utilizes a URLConnection to suck in the content of the "foreign" page and write it to the response. The servlet or JSP would exist within the same domain of the originating page, so you would avoid the "cross-domain" access problem.
hth,
bear
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Gives Access Denied when printing PDF report which is in another frame.