[
https://jira.jboss.org/jira/browse/JBSEAM-3577?page=com.atlassian.jira.pl...
]
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/GettingAStatelessComponentFromASer...
and this one
http://www.seamframework.org/Community/210CR1ThrowsJavalangIllegalStateEx...
--
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