> From: "Jeff Ousley" <[EMAIL PROTECTED]> > Sent: Wednesday, January 15, 2003 10:35 AM > Subject: class files not being found
> All, > > I'm using tomcat 4.1 and I'm noticing that unless your > .class file is not part of a package and in the proper > directory structure under the classes directory, it > cannot be found. Is there a way to use .class files > found under WEB-INF/classes that are not part of a > package? Are you talking about within JSPs? The problem, specifically with JSPs, is not so much that your classes are not within a package, but rather that the JSPs generated servlets ARE within a package. Since these servlets are within a package, they can not see any classes within the "anonymous" package, which is where your classes are. If you look within the 4.1.x examples webapp, there are several servlets in the classes directory that do not have packages, and these work just fine. So, anyway, the answer is "Yes you can use classes without packages in the classes directory", and "No, you can not use classes without packages in JSPs at all". But it's easily remedied. Simply place your classes within a package and be done with it. They should be there anyway. Regards, Will Hartung ([EMAIL PROTECTED]) -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>