[jboss-user] [JBoss Seam] - Seam without JSF + Servlet

reind do-not-reply at jboss.com
Mon Aug 13 14:46:15 EDT 2007

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/*" />

  | 		<servlet-name>Controller</servlet-name>
  | 		<url-pattern>/request/*</url-pattern>
  | 	</servlet-mapping>

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
  | 	org.jboss.seam.Component.forName(Component.java:1577)
  | 	org.jboss.seam.Component.getInstance(Component.java:1627)
  | 	org.jboss.seam.Component.getInstance(Component.java:1610)
  | 	org.jboss.seam.Component.getInstance(Component.java:1604)

but I do have the listener configured in web.xml
  |         <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
  |     </listener>

Any ideas?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073683#4073683

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073683

More information about the jboss-user mailing list