Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 99120 invoked from network); 29 Sep 2003 20:23:03 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 29 Sep 2003 20:23:03 -0000 Received: (qmail 61349 invoked by uid 500); 29 Sep 2003 20:22:33 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 61041 invoked by uid 500); 29 Sep 2003 20:22:31 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 61022 invoked from network); 29 Sep 2003 20:22:31 -0000 Received: from unknown (HELO mustang.mpi.com) (63.244.250.132) by daedalus.apache.org with SMTP; 29 Sep 2003 20:22:31 -0000 Received: from lightning.mpi.com (lightning.mpi.com [63.244.252.11]) by mustang.mpi.com (Switch-2.2.8/Switch-2.2.6) with ESMTP id h8TKL4Y12690 for ; Mon, 29 Sep 2003 16:21:04 -0400 (EDT) Received: from US-VS1.corp.mpi.com (us-be2.corp.mpi.com [63.244.252.32]) by lightning.mpi.com (Switch-3.0.5/Switch-3.0.0) with ESMTP id h8TKMBpd000545 for ; Mon, 29 Sep 2003 16:22:34 -0400 (EDT) X-MimeOLE: Produced By Microsoft Exchange V6.0.6375.0 Content-Class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Full Package Names?? Date: Mon, 29 Sep 2003 16:21:37 -0400 Message-ID: <9C5166762F311146951505C6790A9CF8013DF3AF@US-VS1.corp.mpi.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Full Package Names?? Thread-Index: AcOGpT5l2x6ETl2QTBWnQEoaFBFnrgAIZvuQ From: "Shapira, Yoav" To: "Tomcat Users List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Howdy, >I'm just starting to use Tomcat (4.1.27) and I'm trying to get my existing >app to work. It worked fine with JRun, but it seems that Tomcat requires >that I specify the full package name for a class whenever I use it?? Is >this true? No, tomcat does not required that. Tomcat follows the Java Language Specification regarding package imports, as all servers should. >For example, I get, "cannot resolve symbol" for the following: >------------------------------ >import com.fgic.Utility.* >Utility util =3D new Utility(); You need a semicolon at the end of the import statement. You also probably mean import com.fgic.Utility; rather than import com.fgic.Utility.*; >------------------------------ >But when I change it like below, it works fine: > >import com.fgic.Utility.* >com.fgic.Utility util =3D new com.fgic.Utility(); That's because your import statement is flawed. I don't buy that the above works fine as it shouldn't even compile. >So does this means I have to go through all my code and specify the full >package name everywhere? No. >Note: in JRun, I didn't even have to specify the package name in the import >statement. It was able to find it with just: import Utility.* That's strange at best. In general, you have to import classes you use, or use their fully qualified name if you don't import them. If you post the entire relevant piece of code along with the compilati= on errors in full, we could help more. Yoav Shapira This e-mail, including any attachments, is a confidential business com= munication, and may contain information that is confidential, propriet= ary and/or privileged. This e-mail is intended only for the individua= l(s) to whom it is addressed, and may not be saved, copied, printed, d= isclosed or used by anyone else. If you are not the(an) intended reci= pient, please immediately delete this e-mail from your computer system= and notify the sender. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org