http « jetty « Java Enterprise Q&A

1. Setting HTTP headers with Jetty

What's the best way to set HTTP headers (based on filename patterns) in Jetty 6.1? Is it possible via jetty.xml (or jetty-web.xml)? Or do I have to modify web.xml?

2. Trying to implement example using HttpExchange

I'm trying to implement the code under "Asynchronous Exchanges" from this link in the jetty documentation:

HttpExchange exchange = new HttpExchange();

// Optionally set the HTTP method

exchange.setAddress(new Address("", 80));
// Or, equivalently, ...

3. Limit upload size in embedded Jetty

I'm trying to limit the maximum upload file size Jetty will accept. I've seen multiple reports that the following should work... contextHandler.setMaxFormContentSize(xxx); I notice that this does work for example on our login ...

4. Jetty server allow all cross origins

I use jetty as java lib to run my local server, that has static content. How can I configure this server to allow all cross origins? This is the code of my ...

5. Jetty 7 Reverse HTTP Feature

Is there anyone who can help me to configure jetty maven plugin to use reverse http feature. (Since Jetty 7.4 this feature is avaliable.) Thanks

6. How do you persist the cookie with the Jetty Http Client

The Jetty client is pretty good at what it does but it is not clear to me how can I create something like a cookiejar which will be updated on every ...

7. What is the replacement for KeyStore API in jetty http client?

All the keystore related methods are marked as deprecated in Jetty docs but it does not refer to the replacement API. What API should be used instead?