users@jsr311.java.net

Re: throw WebAppExc instead of return status

From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Date: Tue, 15 Apr 2008 15:20:03 -0400

On Apr 15, 2008, at 3:02 PM, Stephan Koops wrote:
>
> IMO it is useful to require in section 3.7.2 "Request Matching",
> item 3.a.2to define, that a runtime env must return all supported
> methods in the "Allow" header (http://tools.ietf.org/html/rfc2616#section-10.4.6
> )
>
That is already specified in the HTTP RFC (a response with a 405
status code requires an Allow header). I don't want to restate
existing HTTP requirements in the spec.

> IMO it is also useful to give the ExcpetionMapper the supported
> Media Types, so that the ExcpetionMapper could create an entity with
> it (see http://tools.ietf.org/html/rfc2616#section-10.4.7).
> Unfortunately there is / are no header(s) defined by HTTP to support
> this.
> We could define a WebApplication subclass with a special attribute
> for status 406, or a special header which contains this information.
>
Its a pity there's no standard way of conveying that information. WADL
would work for this purpose but it wouldn't be appropriate to require
it in the JSR. For now I think we should leave this as an
implementation detail.

Marc.

>
> mhadley_at_dev.java.net schrieb:
>> Author: mhadley
>> Date: 2008-04-15 16:12:09+0000
>> New Revision: 318
>>
>> Modified:
>> trunk/spec/chapters/providers.tex
>> trunk/spec/chapters/resources.tex
>>
>> Log:
>> Runtime generates exceptions subject to exception mpping providers
>> rather than simply returning a specific response directly
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jsr311.dev.java.net
> For additional commands, e-mail: users-help_at_jsr311.dev.java.net
>

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