1 Reply Latest reply on Aug 13, 2007 4:42 PM by Reind D

    Seam without JSF + Servlet

    Reind D Newbie

      My application is deployed as an EAR with multiple webapps. One of the webapps has a single servlet within which I'd like to use a Seam component. Seam works on the other JSF webapp in the same ear, but I can't get it to work on the servlet.

      I've added a context-filter for the same url-pattern as the servlet uses (as described in the Seam docs):


      <web:context-filter url-pattern="/request/*" />


      The seam components that are in the jar are getting picked up by the ComponentScanner but when I try to inject or use Components.getIntance(...), I get:

      java.lang.IllegalStateException: No application context active

      but I do have the listener configured in web.xml

      Any ideas?

        • 1. Re: Seam without JSF + Servlet
          Reind D Newbie

          Needed the Seam Filter in web.xml...

           <filter-name>Seam Filter</filter-name>
           <filter-name>Seam Filter</filter-name>

          Works now.