[
https://issues.jboss.org/browse/WELD-823?page=com.atlassian.jira.plugin.s...
]
Dan Allen commented on WELD-823:
--------------------------------
Yep, that did it. There must be a jetty-web.xml file in WEB-INF with the contents cited in
the reference documentation.
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
"http://jetty.mortbay.org/configure.dtd">
<Configure id="webAppCtx"
class="org.mortbay.jetty.webapp.WebAppContext">
<Call class="org.jboss.weld.environment.jetty.WeldServletHandler"
name="process">
<Arg><Ref id="webAppCtx"/></Arg>
</Call>
</Configure>
So it appears that the message that injection is available into Servlets is premature. It
really means injection may be available to Servlets if you also have this configuration in
place. Perhaps a follow-up log message should occur in the process() method that gives the
confirmation statement.
Injection into Servlet not working in Jetty 6.x
-----------------------------------------------
Key: WELD-823
URL:
https://issues.jboss.org/browse/WELD-823
Project: Weld
Issue Type: Bug
Components: Web Tier integration (JSF, JSP, EL and Servlet)
Affects Versions: 1.1.0.CR4
Reporter: Dan Allen
Assignee: Matija Mazi
Priority: Trivial
Fix For: 1.2.0.Beta1
Apparently the test suite does not test injection into Servlets for Jetty 6.x because
users are reporting that it doesn't work. I added a Servlet injection into the
numberguess example and was able to verify that the injection is not taking place, despite
receiving the startup message:
INFO: Jetty detected, JSR-299 injection will be available in Servlets and Filters.
Injection into Listeners is not supported.
If this turns out to be a user error, then we need to turn to a documentation
improvement, because a guy like Antonio should not be having difficulty getting this to
work.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira