Subtle issues...

Just to make sure you understand servlet mappings, here’s one more little example. Don’t skim—look closely at both the mapping and the requests. (In this mini “Be the Container”, the answers are at the bottom of the opposite page, so don’t peek.)

Requests:

  1. http://localhost:8080/test/fooStuff/bar/ Container choice:

  2. http://localhost:8080/test/fooStuff/bar Container choice:

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.