It is a JSP application. Under /WEB-INF/src I have A.java and B.java, both in package p. 

Class A uses B. B compiled through but when compiling A, it says Cannot find symbol B.

B.class can be found at /WEB-INF/classes/p/B.class.

One more thing worth mention, at the beginning both A and B are in default package and there was no problem in compilation with either class.

Thanks!