title: How to use Netty from inside a web app - steps to proper configuration
body: <p>I'm trying to setup <a href="http://www.jboss.org/netty" rel="nofollow">Netty</a> to run embedded in my web application. </p>
  
  <p>I have found the following document: <a href="http://docs.jboss.org/netty/3.2/api/org/jboss/netty/channel/socket/http/package-summary.html#package_description" rel="nofollow">http://docs.jboss.org/netty/3.2/api/org/jboss/netty/channel/socket/http/package-summary.html#package_description</a> that describes how to configure a web.xml file that starts a Netty servlet.</p>
  
  <p>Now the document says:</p>
  
  <blockquote>
    <p>Second, you have to bind your
    Netty-based server application in the
    same Servlet context or shared class
    loader space using the local transport
    (see LocalServerChannelFactory.) You
    can use your favorite IoC framework
    such as JBoss Microcontainer, Guice,
    and Spring to do this. The following
    example shows how to bind an echo
    server to the endpoint specifed above
    (web.xml) in JBossAS 5:</p>
  </blockquote>
  
  <p>That sound reasonable but it is not clear to me how - <em>practically</em> - that should work. Say that I want to use Spring as Ioc container, what would be the proper beans configuration to bind netty to the local transport?</p>
  
  <p>Also, how do I start the Spring context? From web.xml?</p>
  
  <p>Thanks</p>