This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
Hi- Thanks in advance for the help here. I have a web app with a number of classes in a package. I can instantiate a new object (system classes) from any of these classes no problem assuming I use the appropriate import statements. The problem arises when I try to create an object from one of the classes in the same package. It can't see them. I'm able to do it from my JSP pages calling the exact same classes, they just can't see each other from inside the package. Does the package need to be added to the classpath? and if it does then why do my jsp pages have no problem seeing the classes? I am running Tomcat 4.0. Is there a setting that needs to be set in the web.xml? I am a little mystified. Scott Farran SCJP
This does sound like a CLASSPATH/import issue. I can instantiate a new object (system classes) from any of these classes no problem assuming I use the appropriate import statements. What does this mean? What is system classes? If your classes are defined to be in some package, then you do need to import them or fully qualify the class locations when you use them. And the parent directory of the package folder structure does need to be locatable in the CLASSPATH setting (and by the application server). [ June 21, 2003: Message edited by: Dirk Schreckmann ]