O'Reilly logo

Google Guice: Agile Lightweight Dependency Injection Framework by Robbie Vanbrabant

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5: Integrating with the Web

All the code examples in the previous chapters had to be run from a main method or a test case. However, it would be foolish to assume that most people write applications that are that simple. Most applications that I, and probably you, write are ultimately web applications, whether you work on the front end or not. On the Java platform, that usually means directly using servlet technology (http://java.sun.com/products/servlet/) or using it indirectly through an MVC framework like Struts (http://struts.apache.org). In this chapter, I will discuss both options from the ground up.

The Integration Challenge

As you probably know, a web container like Tomcat or Jetty has what you could call a managed environment ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required