Log says "JSR-299 injection will be available in Servlets" on Jetty 6, but it is
not if jetty-env.xml and jetty-web.xml are missing
-----------------------------------------------------------------------------------------------------------------------------------
Key: WELD-957
URL:
https://issues.jboss.org/browse/WELD-957
Project: Weld
Issue Type: Task
Affects Versions: 1.1.2.Final
Reporter: Geoffrey De Smet
Priority: Optional
1) Either the log should say "... if jetty-env.xml and jetty-web.xml have been
correctly added."
Or 2) it should check if they are there in the war before state that injection works on
servlets.
Or 3) - better yet - the system should be improved so the jetty-web.xml thing is obsolete
(like on tomcat).
That log statement was very misleading and it took me quite some time to find out that it
was not my jetty6 plugin that was causing the trouble, but that in fact I was missing
these bits:
http://docs.jboss.org/weld/reference/1.1.0.Final/en-US/html_single/#d0e5286
I've looked into 3), but adding this in
org.jboss.weld.environment.jetty.AbstractJettyPre72Container:
{code}
Class<?> weldServletHandlerClass =
Reflections.classForName("org.jboss.weld.environment.jetty.WeldServletHandler");
Method processMethod = weldServletHandlerClass.getMethod("process",
WebAppContext.class);
processMethod.invoke(null, (WebAppContext)
WebAppContext.getCurrentWebAppContext());
{code}
But that results in 404, because in
org.jboss.weld.environment.jetty.WeldServletHandler#WeldServletHandler
the existingHandler is properly started and the new one is not.
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira