Return-Path: Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 25133 invoked from network); 16 Nov 2000 19:03:47 -0000 Received: from imo-r12.mx.aol.com (HELO imo-r12.mail.aol.com) (152.163.225.66) by locus.apache.org with SMTP; 16 Nov 2000 19:03:47 -0000 Received: from JTBldrCO@aol.com by imo-r12.mx.aol.com (mail_out_v28.33.) id t.93.3042cc9 (14383); Thu, 16 Nov 2000 14:03:12 -0500 (EST) From: JTBldrCO@aol.com Message-ID: <93.3042cc9.2745896f@aol.com> Date: Thu, 16 Nov 2000 14:03:11 EST Subject: Accessing Servlets In Packages To: JTBldrCO@aol.com, tomcat-user@jakarta.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Windows AOL sub 115 X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N I seem to have my problem solved, but let me get this back on the mailing list for the benefit of the archives -- I was having trouble accessing servlets that reside in my own packages. My test cases could access .class files in: /usr/local/jakarta-tomcat/webapps/myWebApp/WEB-INF/classes For example "SnoopServlet.class" in that subdir is accessed with: http://www.mySiteName.com/myWebApp/servlet/SnoopServlet Now, take a class, SomePackageClass, declared to be in package testapackage within its .java code file. Its compiled form is in the following file: /usr/local/jakarta-tomcat/webapps/myWebApp/WEB-INF/classes/testapackage/SomePa ckageClass.class I would like to (but CANNOT) access it with: http://www.mySiteName.com/myWebApp/servlet/testapackage/SomePackageClass INSTEAD, I FIND I MUST USE: http://www.mySiteName.com/myWebApp/servlet/testapackage.SomePackageClass (Note the "." notation separating the package name and class name, rather than a "/".) Unfortunately, the slash notation worked with JServ, for which I have tons of working code, but not with Tomcat. Thanks for others' comments related to possible addition of tags in file ..../webapps/myWebApp/WEB-INF/web.xml but it looks like I'd still have to change all my JServ code (the calling HTML) that used the slash notation. Incidentally, I found a sprinkling of material pertaining to my problem in the new book "Core Servlets and JavaServer Pages" by Marty Hall. This was published this year (year 2000) for Sun Microsystems by Prentice Hall (see pages 30-42). I wish to give them a plug for this very current effort complete with some updates based on Tomcat 3.1. Price is US$42.99. John Thompson Boulder, Colorado, USA JTBldrCO@aol.com