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 ...

Get Google Guice: Agile Lightweight Dependency Injection Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.