フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Carleen Dickerson
JIRA in IFrame portlet - javascript doesn't work
2013/04/24 13:09
答え

Carleen Dickerson

ランク: New Member

投稿: 9

参加年月日: 2013/03/12

最近の投稿

Hello - I'm attempting to embed a JIRA application into Liferay as an IFrame portlet. I can successfully navigate to the JIRA site and login, but after that none of the Javascript elements work. So I can't use any of the drop-down menus, and even the JIRA fields themselves don't display properly.

I should also mention that the Liferay & JIRA apps are being hosted by the same Tomcat server.

Can anyone think of a reason this would be happening?

Thanks!
Carleen

EDIT: Upon finally running Firebug I see I'm getting the following error: "Permission denied to access property BLAH". Why would this happen when Liferay and JIRA are being hosted from the same server??
匿名
RE: JIRA in IFrame portlet - javascript doesn't work
2013/04/24 18:03
答え

匿名

Hello Carleen,

That error is usually caused by cross-domain security features for javascript built into most modern browsers. You can read about it here:

http://en.wikipedia.org/wiki/Same_origin_policy
James Falkner
RE: JIRA in IFrame portlet - javascript doesn't work
2013/04/25 9:09
答え

James Falkner

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1236

参加年月日: 2010/09/17

最近の投稿

James Harrison Schueler:
Hello Carleen,

That error is usually caused by cross-domain security features for javascript built into most modern browsers. You can read about it here:

http://en.wikipedia.org/wiki/Same_origin_policy


If you have full control over your JIRA instance and associated web server, you can allow its javascript to be executed in other domains using the workarounds described in the JIRA Feature Request for CORS support.
Carleen Dickerson
RE: JIRA in IFrame portlet - javascript doesn't work
2013/04/25 11:27
答え

Carleen Dickerson

ランク: New Member

投稿: 9

参加年月日: 2013/03/12

最近の投稿

Thanks for your answers. I'm learning about the issue of CORS now, but still don't know how to implement it. I have full control of the server that Liferay and JIRA reside on, but I don't know what code within each needs to be changed for CORS. Is it as simple as setting a Tomcat configuration, or do I need to modify the source code (somehow) of each application?

Thanks so much,
Carleen
James Falkner
RE: JIRA in IFrame portlet - javascript doesn't work
2013/04/25 11:48
答え

James Falkner

LIFERAY STAFF

ランク: Liferay Legend

投稿: 1236

参加年月日: 2010/09/17

最近の投稿

Carleen Dickerson:
Thanks for your answers. I'm learning about the issue of CORS now, but still don't know how to implement it. I have full control of the server that Liferay and JIRA reside on, but I don't know what code within each needs to be changed for CORS. Is it as simple as setting a Tomcat configuration, or do I need to modify the source code (somehow) of each application?

Thanks so much,
Carleen



The way I understand it, if you can get your JIRA server's HTTP responses to include

Access-Control-Allow-Origin: *

in its headers for all responses, the browser should run it. Of course, * isn't very secure, so you could tune that later. Further, I understand that JIRA itself cannot do this, which is why some people front it with Apache, to stick that header in there, or this guy used a Tomcat plugin to insert the headers.
Carleen Dickerson
RE: JIRA in IFrame portlet - javascript doesn't work
2013/04/26 8:25
答え

Carleen Dickerson

ランク: New Member

投稿: 9

参加年月日: 2013/03/12

最近の投稿

Thanks James. I'm trying the plugin you mentioned, but it doesn't seem to be doing anything. In fact, when I check Firebug for the XHR request, there isn't one at all. Does that mean that I'm really not doing XSS?? CORS only works for XHR requests, right?

Carleen