Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 47842 invoked from network); 1 Mar 2005 14:22:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Mar 2005 14:22:00 -0000 Received: (qmail 73301 invoked by uid 500); 1 Mar 2005 14:21:40 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 73275 invoked by uid 500); 1 Mar 2005 14:21:40 -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 73261 invoked by uid 99); 1 Mar 2005 14:21:40 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from proxy.qas.com (HELO MAIL2.qas.com) (195.172.82.234) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 01 Mar 2005 06:21:39 -0800 Received: from orion.qas.com (orion.qas.com [150.150.100.34]) by MAIL2.qas.com (Content Technologies SMTPRS 4.3.17) with ESMTP id for ; Tue, 1 Mar 2005 14:04:56 +0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6603.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Need access to classes outside Tomcat for JSPs Date: Tue, 1 Mar 2005 14:04:56 -0000 Message-ID: <5684A7E6FB10504393A2806C1F4C021005AF8495@orion.qas.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Need access to classes outside Tomcat for JSPs Thread-Index: AcUeZjOH+25V3xqHSMSDwcTs6uaR3wAAP/lQ From: "Allistair Crossley" To: "Tomcat Users List" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Right, a well formed web application is packaged with its dependent classes= . Tomcat loads classes from either WEB-INF/classes folder or the lib folder= in the form of a JAR for your webapp, or other places like common/lib and = shared/lib. It does not use your system classpath. The previous poster was absolutely right with his advice. You need to sort = out your build environment. You can still have 1 source respository, but wh= en you build (via Ant let's say since it's the most ubiquitous) you direct = compiled classes into your 2 locations. You could perhaps wrap them in a JA= R for Tomcat's purposes, it's up to you. Having the same classes twice is no bad thing - having source twice is.=20 Allistair. > -----Original Message----- > From: Dan [mailto:dan@mcenter.com] > Sent: 01 March 2005 13:55 > To: Tomcat Users List > Subject: Re: Need access to classes outside Tomcat for JSPs >=20 >=20 > Do people read anymore? >=20 > As previously stated in the original post, these classes need to be=20 > available to other non-web, non TomCat applications. I do=20 > not want to have=20 > to maintain two different repositories. Also as previously=20 > stated I have=20 > the desired configuration running on another box but I cannot=20 > duplicate the=20 > setup on this box. >=20 > If your only advice is to move them into TomCat, then please=20 > don't even=20 > bother replying. >=20 >=20 > At 08:21 AM 3/1/2005, David wrote: > >Why do you want your classes outside of Tomcat? Copy the=20 > classes to your=20 > >project when you build and eliminate the dependency. Or=20 > better yet, use a=20 > >build environment like Ant to do the copying for you. As a=20 > bonus, it'll=20 > >catch errors before you get to production and the webapp=20 > will be more portable. > > > >--David > > > >Dan wrote: > > > >>Classpath problem. Really frustrating. > >> > >>I'm trying to duplicate a setup on system A to system B and=20 > can't get it=20 > >>working. My problem is when I access the JSP page, Tomcat=20 > complains of a=20 > >>ClassNotFound exception. This happens with all of my=20 > custom classes. If=20 > >>I create a simple JSP page with no custom classes the JSP=20 > compiles fine. > >> > >>When I manually execute the class via "java=20 > com.xxx.MyClass" it responds=20 > >>appropriately (my environment's CLASSPATH includes the=20 > custom library paths). > >> > >>My custom classes live outside of the Tomcat directory (see below)=20 > >>because I use these classes in other non-web based=20 > applications, so they=20 > >>need to be available system wide. > >> > >>I have melted my brain today trying to figure out why=20 > system A works with=20 > >>this configuration but system B gives me the ClassNotFound=20 > exception. I=20 > >>have even copied my entire Tomcat directory from system A=20 > to system B=20 > >>with no change. I thought perhaps I was starting the service with=20 > >>additional parameters but I don't see any in the registry settings. > >> > >> > >>Does anyone have an educated guess as to why I can't get=20 > this thing to=20 > >>work the way it's working on the other system and/or how I=20 > can get this=20 > >>working with my custom classes OUTSIDE of Tomcat. > >> > >> > >> > >>Win2K SP4 > >>Tomcat v5.0.27 as NT Service > >> > >>e:\java\tomcat > >>e:\java\sdk (JDK 1.4.2) > >>e:\java\library\custom\ (custom libraries) > >>e:\java\library\basic (libraries from other sources) >=20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org >=20 >=20 =20 ------------------------------------------------------- QAS Ltd. Developers of QuickAddress Software www.qas.com Registered in England: No 2582055 Registered in Australia: No 082 851 474 ------------------------------------------------------- --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org