It's a bit hard to avoid when you use common Java APIs, one class might provide a helper method for doing stuff with servlets, and you use something else in that class, but it won't load unless the servlet api is present.