tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Stacy <cst...@crystaliz.com>
Subject beginner question about class loading
Date Thu, 13 Apr 2000 18:36:58 GMT
I am running Tomcat (a few weeks old) (with Apache) on NT.
I am using the default "web.xml" file.

I have a JSP (located in "webapps/mytop/my.jsp") that invokes a bean FOO.Bean.
The bean is being loaded from "webapps/mytop/WEB-INF/classes/FOO/Bean.class".

The bean successfully does things like 

Now I want the bean to instantiate another class Foo, which is part of the same FOO package.
The source file "Foo.java" (like "Bean.java") begins with a "package FOO" statement.
I placed "Foo.java" in the same directory (FOO) and compiled it.

However, the following statement in Bean.java will not compile:
	 Foo f = new Foo();
because it cannot resolve the symbol "Foo".

How do I tell JAVA how to resolve this symbol and make this work?

Both classes are in the same package, so I don't think I need to import anything.
It must be a confusion about where the class files live, or else something even more basic.


Mime
View raw message