Re: JSR311: Limit extensions pre-processing

From: Bill Burke <>
Date: Fri, 11 Jul 2008 12:38:48 -0400

Stephan Koops wrote:
> Hi,
> Marc Hadley schrieb:
>> On Jul 9, 2008, at 8:30 PM, Roy T. Fielding wrote:
>>> [...]
>> Given the above I think the only reasonable thing to do right now is
>> to remove the automatic URI-based conneg feature. Even limiting it to
>> safe operation would violate the mapping of specific resources to
>> generic resource classes. If we had a longer than the two weeks
>> remaining before proposed final draft we could perhaps investigate
>> other approaches but that's not an option for this rev of the
>> specification.
> If a browser access a resource, some browsers (e.g. IE 7, FF 2) will
> request XML with a higher priority than HTML. Not fine, but it's the
> reality. So I think for GET (inclusive HEAD), OPTIONS and other safe
> methods it is good.

IMO, just create new Java methods to do things. Its a little more
verbose, but... so what?

public String getHtml() {...}

public String getXml() {...}

@Produces("application/xml", "text/html")
public Response get() {
    if (wantsHtml) return Response.entity(getHtml());
    else if (wantsXml) return Response.entity(getXml());

Bill Burke
JBoss, a division of Red Hat