Tomcat @Resource annotations API annotation stops working in Tomcat 7

后端 未结 4 2114
暗喜
暗喜 2021-01-29 12:44

I have been using Tomcat 6.0.26-6.0.35 for several years with JSF 2 Mojarra, various versions up to 2.1.2 which I have been using for some months. I have several request-scoped

4条回答
  •  天命终不由人
    2021-01-29 13:06

    Another possibility, yet I would think unlikely; is you are using metadata-complete="true" in your web.xml or web-fragment.xml file(s).

    Defined metadata-complete: The metadata-complete attribute defines whether this deployment descriptor and other related deployment descriptors for this module (e.g., web service descriptors) are complete, or whether the class files available to this module and packaged with this application should be examined for annotations that specify deployment information. If metadata-complete is set to "true", the deployment tool must ignore any annotations that specify deployment information, which might be present in the class files of the application. If metadata-complete is not specified or is set to "false", the deployment tool must examine the class files of the application for annotations, as specified by the specifications.

    Example web.xml:

    
    
      ResourceTest
      
        index.html
        index.htm
        index.jsp
        default.html
        default.htm
        default.jsp
     
    
    

提交回复
热议问题