title: Simple Example with Guice Servlets
body: <p>I don't know how to proceed with a simple guice example. After reading the documentation I've done the following:</p>
  
  <ul>
  <li>setup the guiceFilter</li>
  <li>created an injector and instantiated a new ServletModule in a <code>GuiceServletContextListener</code> and added the listener to web.xml</li>
  <li>bound <code>serve("*.jsp").with(IndexController.class);</code> in configure servlets</li>
  </ul>
  
  <p>After I've done that how do I use dependency injection? Let's say I have an index.jsp, IndexController.class (servlet), and two classes called Person and Order with Person depending on Order. How do I inject the Order dependency into the Person constructor via guice and after I do that I would need to return say a list of this person's orders back to the controller? I've used Ninject with ASP.NET MVC in the past and that was pretty simple, but I'm very confused on how to implement even the simplest DI example with Guice. Thanks.</p>