Vista combinada Visión Plana Vista de árbol
Discusiones [ Anterior | Siguiente ]
toggle
Carleen Dickerson
JIRA in IFrame portlet - javascript doesn't work
24 de abril de 2013 13:09
Respuesta

Carleen Dickerson

Ranking: New Member

Mensajes: 9

Fecha de incorporación: 12 de marzo de 2013

Mensajes recientes

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??
Anónimo
RE: JIRA in IFrame portlet - javascript doesn't work
24 de abril de 2013 18:03
Respuesta

Anónimo

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
25 de abril de 2013 9:09
Respuesta

James Falkner

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1229

Fecha de incorporación: 17 de septiembre de 2010

Mensajes recientes

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
25 de abril de 2013 11:27
Respuesta

Carleen Dickerson

Ranking: New Member

Mensajes: 9

Fecha de incorporación: 12 de marzo de 2013

Mensajes recientes

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
25 de abril de 2013 11:48
Respuesta

James Falkner

LIFERAY STAFF

Ranking: Liferay Legend

Mensajes: 1229

Fecha de incorporación: 17 de septiembre de 2010

Mensajes recientes

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
26 de abril de 2013 8:25
Respuesta

Carleen Dickerson

Ranking: New Member

Mensajes: 9

Fecha de incorporación: 12 de marzo de 2013

Mensajes recientes

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