Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So i am trying to add

Access-Control-Allow-Origin: *

In the Jetty config file, on which the Geoserver is running to receive the contents from popup (which I am not receiving since there is no connection between the 8000 on which my localhost is running and 8080 on which jetty Geoserver is running).

Does anybody have any clue where the Jetty config file is to which I need to add the aboce header?

Code Update

info = new OpenLayers.Control.WMSGetFeatureInfo({
            url: 'http://localhost:8080/geoserver/iPlant/wms', 
            title: 'Identify features by clicking',
            queryVisible: true,
            eventListeners: {
                getfeatureinfo: function(event) {
                    map.addPopup(new OpenLayers.Popup.FramedCloud(

This is the error I am getting in the developer tool,

XMLHttpRequest cannot load http://localhost:8080/geoserver/iPlant/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=iPlant%3AAllQuebecSpecies&QUERY_LAYERS=iPlant%3AAllQuebecSpecies&STYLES=&BBOX=-115.488281%2C18.984375%2C-25.488281%2C63.984375&FEATURE_COUNT=10&HEIGHT=512&WIDTH=1024&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=478&Y=212. Origin http://localhost:8000 is not allowed by Access-Control-Allow-Origin.
share|improve this question

closed as too localized by underdark Jun 8 '12 at 16:26

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

why you need to add this header in your code ?. i think there is noneed to add this. – yogesh prajapati Jun 8 '12 at 1:35
I was previously having issues on my Ubuntu 12.04. The proxy was not working and so to allow XMLHttpRequest I needed to add this as this the standard today. But I also installed OpenGeo on my Ubuntu Server 11.04 and it is working fine on that so I think this question can be closed – Sam007 Jun 8 '12 at 16:21