On 17/04/2012 13:48, maria petrova wrote:
> Hi,
> 
> 
> We’ve embedded Tomcat 7.0.26 in our product and we are currently trying
> to cover Servlet 3.0 CTS with it.  We’ve encountered the following
> problem with one of the tests.
> 
> Though the version of the web deployment descriptor of the test
> application is 2.5, there is a servlet annotated with *@WebServlet
> *annotation and requests to this servlet are responded with 404 Not
> Found. When I change the version of the web.xml to 3.0 everything works
> just fine.
> 
> 
> In Chapter /“*1.6.2 Regarding Processing annotations*”/ in the Servlet
> 3.0 Specification it is said that:
> 
> /“The version of the descriptor MUST not affect which annotations you
> scan for in a web application.”/

It also says:

"An implementation of a particular version of the specification MUST
scan for all annotations supported in that configuration, unless
metadata-complete is specified."

So I ask "which configuration?" - interpreting it to mean that Servlet
3.0 supports the WebServlet annotation etc, and 2.5 does not, because
that annotation is not present in 2.5.


p

> So my understanding is that the application should be processed for
> Servlet 3.0 specific annotations regardless of the version of the
> deployment descriptor.
> 
> 
> As far as I’m aware, each new Tomcat release successfully covers Servlet
> 3.0 CTS, so I’m wondering if I’ve missed some configuration on Tomcat side?
> 
> Any hints or ideas are highly appreciated.
> 
> 
> Thanks!
> 
> Maria
> 
> 
> P.S. The issue is easily reproducible with clean Tomcat 7.0.26
> installation and the attached simple test applications. They differ only
> in the web.xml’s version and only /AnnotTest_30/AnnotServlet is
> correctly responded, while /AnnotTest_25/AnnotServlet gets 404 response.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org


-- 

[key:62590808]

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to