Richard G Hayward wrote:However K&B explicitly say (p30) that to keep the example simple this servlet isn't in a package.
William Brogden wrote:
A common beginner mistake.
ALL classes used in servlets MUST be in packages and the class file in the corresponding directory. The reason being that without a specified package, the JVM looks in the "current" directory - something you have no control over.
Bear Bibeault wrote:Sometimes an unpackaged servlet can work. Sometimes. It's best not to rely upon the convergence of celestial bodies and to always package all classes.