| Author |
How to implement Cross origin resource sharing in JSP
|
Amit K Jain
Ranch Hand
Joined: Nov 06, 2008
Posts: 55
|
|
Hi,
Could you please guide me on this?
I have to web applications running on two different servers. I am trying to open a page on one server in new window from the page on another server, however I get the error access denied.
e.g.
this is the parent URL: http://102.12.12.21:9083/support/openair_test.html?action=paint;id=511 on which I have a hyperlink pointing to the link http://localhost:9085/EPOApp/child.jsp.
Below are the snippet:
On the parent page I have
< a onclick="window.open('http://localhost:9085/EPOApp/child.jsp');">EPO < /a>
In child.jsp below is the Javascript code to read the parent url on onload event.
Can someone please help how to resolve this issue? If it is a 'cross origin resource sharing' concept, how can it be implemented here.
Thanks
Amit
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56153
|
|
Please take the time to choose an appropriate forum for your posts. This forum is for questions on JSP, not JavaScript. For more information, please click this link ⇒ CarefullyChooseOneForum.
This post has been moved to a more appropriate forum.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
Amit K Jain
Ranch Hand
Joined: Nov 06, 2008
Posts: 55
|
|
Hi Bear,
Sorry if I posted it at wrong place.
My question is more on JSP application and I put the Javascript code to mention what I tried. I am certainly not expecting the answer from Javascript point of view only. It can be any solution that can be implemented in JSP web application.
Thanks
Amit
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
JavaScript can not read the other domain. CORS will not help with a pop up window.
Eric
|
 |
 |
|
|
subject: How to implement Cross origin resource sharing in JSP
|
|
|