Hello Angelo,

best use a request Filter. For example:

public class IEStandardModeHeader implements RequestFilter {
    
    
    private static final String HEADER_KEY = "X-UA-Compatible";
    
    @Override
    public boolean service(Request request, Response response,
            RequestHandler handler) throws IOException {
    
        response.setHeader(HEADER_KEY, "IE=8");
        return handler.service(request, response);   
            
    }
    
}

To activate the filter you need to contribute it in AppModule:

public static void contributeRequestHandler(
            OrderedConfiguration<RequestFilter> configuration) {
        Configuration.add(...);
}


Hope this helps!

Kind Regards,
Wulf

-----Original Message-----
From: Angelo C. [mailto:angelochen...@gmail.com] 
Sent: Donnerstag, 3. Februar 2011 12:10
To: users@tapestry.apache.org
Subject: t5: adding http header


Hi,

I need to add some http headers into response, like 
Access-Control-Allow-Origin: "*", how to achieve this? Thanks,

Angelo
-- 
View this message in context: 
http://tapestry.1045711.n5.nabble.com/t5-adding-http-header-tp3369097p3369097.html
Sent from the Tapestry - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to