The ONLY way a servlet can use a class is if it is in the available classpath, which is usually the classes in the web container's classpath and those in WEB-INF/lib and WEB-INF/classes.
If you want to make a remote call (
EJB, RMI), any client classes (stubs) must be in one of the locations listed above.