[weld-issues] [JBoss JIRA] (WELD-957) 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

Ales Justin (Commented) (JIRA) jira-events at lists.jboss.org
Wed Oct 19 12:23:45 EDT 2011


    [ https://issues.jboss.org/browse/WELD-957?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12635833#comment-12635833 ] 

Ales Justin commented on WELD-957:
----------------------------------

This is the current work branch for this issue: https://github.com/alesj/core/tree/jetty-int-2

                
> 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: Bug
>    Affects Versions: 1.1.2.Final
>            Reporter: Geoffrey De Smet
>            Assignee: Ales Justin
>            Priority: Critical
>
> 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 stating 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), by 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.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the weld-issues mailing list