The Joy of Deployment

We’ve covered most of the fun stuff, but now it’s time for a more detailed look at deployment.

In this chapter, you need to think about three main issues:

  1. Where do YOU put things in the web app?

    Where do you put static resources? JSP pages? Servlet class files? JavaBean class files? Listener class files? Tag Files? Tag handler classes? TLDs? JAR files? The web.xml DD? Where do you put things that you don’t want the Container to serve? (In other words, which parts of the web app are protected from direct client access?) Where do you put “welcome” files?

  2. Where will the CONTAINER look for things in the web app?

    Where will the Container look when the client requests an HTML page? A JSP page? A servlet? Something that doesn’t exist as an actual file (like, BeerTest .do)? Where will the Container look for tag handler classes? Where will the Container look for TLDs? Tag Files? JAR files? The Deployment Descriptor? Other classes my servlets depend on? Where does the Container look for “welcome” files ? (Obviously, once you know all of this, then everything in number “1” becomes a no-brainer.)

  3. How does the CLIENT request things in the web app?

    What does the client type into the browser to access an HTML page? A JSP page? A servlet? Something that doesn’t actually exist as a file? In which places can the client make a direct request, and in which places is the client restricted from direct access to a resource? What happens if the client types in a path to only a directory, ...

Get Head First Servlets and JSP, 2nd Edition 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.