Thanks Claus - 

I think this has gotten me on the right track, but I'm not quite there yet
and am not sure why. Here are some snippets of code to help describe the
problem. We are using the Groovy DSL and executing using "Main."

Here is the new binding definition:

    class CORSHttpBinding extends DefaultHttpBinding {
        @Override
        public void writeResponse(exch, resp) {
            resp.Header("test", "test")
            super.writeResponse(exch, resp)
        }
    }

This is added to the Registry via "Main" as follows:

    Main main = new Main()
    main.bind("CORSHttpBinding", new CORSHttpBinding())
    .
    .
    .
    main.run()

Finally, the Jetty route is specified as follows (additional routing after
this has been omitted):

   
from("jetty:http://0.0.0.0:$port/validate/ping?httpBindingRef=CORSHttpBinding";)

I've added some debugging code in various places, but "writeResponse()" is
never called.

Thanks for any help - I am fairly new to this, if that's not obvious, and am
still getting my Camel-legs.

Tim



--
View this message in context: 
http://camel.465427.n5.nabble.com/Adding-HTTP-Headers-to-All-Jetty-Routes-tp5754265p5754804.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to