[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-3577) Seam Context not working in Servlets
Sean Burns (JIRA)
jira-events at lists.jboss.org
Fri Oct 17 05:38:20 EDT 2008
[ https://jira.jboss.org/jira/browse/JBSEAM-3577?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12434198#action_12434198 ]
Sean Burns commented on JBSEAM-3577:
------------------------------------
This is the steps you can use to reproduce this
1 : Use seam gen to create a new project, defaults for everything.
2: create a servlet
public class TestServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
super.doGet(req, resp);
Component.getInstance("authenticator");
}
}
3: add to web.xml
<servlet>
<servlet-name>Test Servlet</servlet-name>
<servlet-class>com.mydomain.TestProject.TestServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Test Servlet</servlet-name>
<url-pattern>/m/test</url-pattern>
</servlet-mapping>
4: add to components.xml
<web:context-filter url-pattern="/m/*" />
5: goto http://localhost/TestProject/m/test
> Seam Context not working in Servlets
> -------------------------------------
>
> Key: JBSEAM-3577
> URL: https://jira.jboss.org/jira/browse/JBSEAM-3577
> Project: Seam
> Issue Type: Bug
> Affects Versions: 2.1.0.CR1, 2.1.0.GA
> Environment: JBoss 4.2.3, Seam 2.1.0 GA
> Reporter: Sean Burns
> Assignee: Pete Muir
> Priority: Blocker
> Fix For: 2.1.0.GA
>
>
> I used to able to look up components with Component.getInstance(...) inside a servlet by adding <web:context-filter url-pattern="/m/*" /> to the components.xml (in Seam 2.0.X).
> This has stopped working and now gives
> "java.lang.IllegalStateException: No event context active"
> This post relates
> http://www.seamframework.org/Community/GettingAStatelessComponentFromAServletDoesNotWorkAnymoreUnderSeam210CR1#comment46832
> and this one
> http://www.seamframework.org/Community/210CR1ThrowsJavalangIllegalStateExceptionEventContextNotActive
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the seam-issues
mailing list