Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-1621

WELD-000710: Cannot inject ServletContext outside of a Servlet request

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 2.2.0.CR1
    • 2.1.2.Final
    • None
    • None
    • Hide

      @Singleton
      public class ApplicationScopedBean

      { @Inject private ServletContext ctx; ... }
      Show
      @Singleton public class ApplicationScopedBean { @Inject private ServletContext ctx; ... }

    Description

      Is it correct that the ServletContext can be injected only into request-scoped beans? IMO ServletContext by nature is an application-scoped object.

      Also this spec says that ServletContext is application-scoped bean:
      http://docs.jboss.org/seam/3/servlet/latest/reference/en-US/html/injectablerefs.html#injectablerefs.servlet_context

      Attachments

        Activity

          People

            rhn-engineering-jharting Jozef Hartinger
            msevcenko Michal Ševčenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: