users@jax-rs-spec.java.net

[jax-rs-spec users] [jsr339-experts] Re: Re: Default Servlet Mapping?

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Thu, 15 Mar 2012 16:15:28 -0400

On Mar 15, 2012, at 4:00 PM, Bill Burke wrote:

>
>
> On 3/15/12 3:54 PM, Santiago Pericas-Geertsen wrote:
>>
>> On Mar 15, 2012, at 3:31 PM, Bill Burke wrote:
>>
>>> I would say do nothing because it would break existing 1.1 applications when deployed.
>>
>> How so? Before you had to always specify the mapping, and that will continue to take precedence. Can you elaborate?
>>
> We assumed everything could be scanned, you could have an empty web.xml file, and no Application class. This was an incorrect assumption? I know a lot of people use us in this manner. Maybe I just interpreted the 1.1 spec wrong?

 Class scanning and servlet mapping are orthogonal. The only way you can get the servlet mapping in 1.1 is from (i) a web.xml or (ii) the @ApplicationPath annotation on an Application subclass AFAICT, with (i) overriding (ii) if both are present. For the other cases, 1.1 states that "the application MUST be packaged with a web.xml that specifies a servlet mapping for the added servlet".

 Perhaps you're already using a default in Resteasy?

-- Santiago