This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
I agree with Bear on most points. (I've stopped being surprised at this )
Yes, always try to place the jars in the WEB-INF/lib directory. There are some specific cases I've found it necessary to place them elsewhere, but they are the exception to the rule (such as using LDAP for authentication, since the server needs the jars too)
I tend to try to do it the way Bear says at compile time, and this is a good way to do it, although when I'm feeling lazy I place the runtime jars in the WEB-INF/lib dir and the compiletime or testing JARs (such as junit or j2ee jars) in a lib jar.
Originally posted by David O'Meara: There are some specific cases I've found it necessary to place them elsewhere...
Another good example of this is when using container-managed connection pooling. The jar file with the JDBC implementation must be placed in common/lib so that it available to both Tomcat and the web apps.