Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

I am trying to add a response header to the Jetty configuration the following command,

Access-Control-Allow-Origin: *

Ok so this Jetty webserver is the base on which Geoserver is running. I asked this question in the GIS forum but no one was able to answer it so I felt I might get the answer here. I wish to add this response to the header to remove the error

Unable to load XMLHttpRequest

I wish to know that under which tags should I wrap this response header and where in the file should I save it.

share|improve this question
up vote 0 down vote accepted

My preference is to add headers in a proxying web server. If you have Apache HTTP infront of your Jetty instance then use the Header directive.

In answer to the question, to perform this purely in Jetty see setting-http-headers-with-jetty

share|improve this answer
thanks that is what I did – Sam007 Oct 7 '12 at 16:15

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.