dev@jsr311.java.net

Re: PUT and DELETE tunneling

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Mon, 09 Jul 2007 10:35:28 -0400

On Jul 9, 2007, at 6:23 AM, Dhanji R. Prasanna wrote:
> >
> > @HttpMethod(DELETE) @HttpMethodOverride("X-HTTP-Method-Override",
> > PUT) void delete() {...}
> >
> In a servlet container you could just write a servlet filter to patch
> the request method based on, e.g., the X-HTTP-Method-Override header.
>
> At somewhat of a tangent...
> Do we want to have some kind of generic interception at the API
> level for Requests and Responses? I.e. independent from the
> deployment environment? For example, a JAX-RS filter. If we're
> providing container managed resources (with scoping to request and
> singleton), interception would be an important use case.
>
Good question. Personally I don't currently see the need for a JAX-RS
filter since underlying containers generally have their own filtering
mechanisms and, to do anything useful (like work with container
managed resources), you'd generally have to drop down to the
container APIs anyway thus nullifying the advantage of a container
independent filtering API.

Marc.

---
Marc Hadley <marc.hadley at sun.com>
CTO Office, Sun Microsystems.