[jetty-user] Jetty - Access-Control-Allow-Origin

AlanS <[email protected]> Mon, 19 Mar 2012 10:52:03 -0700 (PDT)
Newsgroups gmane.comp.java.jetty.support
Message-ID <[email protected]>
Hello. 

 I create a context for a certain war file in Java code and would like to
make sure the HTTP Response Header has "Access-Control-Allow-Origin:  *". I
can do this in the doGet code section of course with a:

 public void handle(..., HttpServletResponse httpResponse, ...){

     httpResponse.setHeader("Access-Control-Allow-Origin", "*");

 ---

 but my question is how do I do it for the home page of a war file that is
added to the server like:

 Server server = new Server(80);
 List<Handler> listHandler = new ArrayList<Handler>();
 WebAppContext webAppContext = new
WebAppContext("../webapps/ePAD.war","/epad");
 listHanlder.add(webAppContext);

 Thanks for any responses.

Alan
 

--
View this message in context: http://jetty.4.n6.nabble.com/Jetty-Access-Control-Allow-Origin-tp4634198p4634198.html
Sent from the Jetty Support mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email