You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by RAndy Peter <ra...@opm.state.ok.us> on 2001/09/13 22:09:24 UTC

WEB-INF v. required package subdirectory

I'm using Tomcat 3.2, stand alone.  When I put my servlets under
WEB-INF/classes, everything works fine.  But when I try to place them in the
sub-directory required by a package (for example, WEB-INF/classes/aaa/bbb/),
Tomcat can no longer find them.  I've tried several different placements of
the sub-directory structure, but to no avail.  Anybody care to help me out?


Re: WEB-INF v. required package subdirectory

Posted by Plamen Petkov <pl...@bgstore.com>.
Hi,

If you *realy* don't want to put your classes in packages, change your
tomcat startup script ( <tomcat-home>/bin/tomcat.sh ) and manualy add
these subdirectories to the CLASSPATH

However, I wouldn't reccomend that :-) Packages are better and essential
solution ! Besides, everytime you (your company) upgrade Tomcat you
(somebody) have to change this again. Imagine you are in a holyday :-)
Imagine tomcat.sh changes in the future :-)

Regards,
---
Plamen D. Petkov, ICQ# 2214327
plamendp@bgstore.com
http://www.bgstore.com


----- Original Message -----
From: Jeff Turner <je...@socialchange.net.au>
To: <to...@jakarta.apache.org>
Sent: Friday, September 14, 2001 12:42 AM
Subject: Re: WEB-INF v. required package subdirectory


> On Thu, Sep 13, 2001 at 03:09:24PM -0500, RAndy Peter wrote:
> > I'm using Tomcat 3.2, stand alone.  When I put my servlets under
> > WEB-INF/classes, everything works fine.  But when I try to place
them in the
> > sub-directory required by a package (for example,
WEB-INF/classes/aaa/bbb/),
> > Tomcat can no longer find them.  I've tried several different
placements of
> > the sub-directory structure, but to no avail.  Anybody care to help
me out?
>
> Simple classpath stuff. If you have a class Foo in aaa/bbb, then it
must
> be in package aaa.bbb:
>
> package aaa.bbb;
> public class Foo {
> ..
> }
>



Re: WEB-INF v. required package subdirectory

Posted by Jeff Turner <je...@socialchange.net.au>.
On Thu, Sep 13, 2001 at 03:09:24PM -0500, RAndy Peter wrote:
> I'm using Tomcat 3.2, stand alone.  When I put my servlets under
> WEB-INF/classes, everything works fine.  But when I try to place them in the
> sub-directory required by a package (for example, WEB-INF/classes/aaa/bbb/),
> Tomcat can no longer find them.  I've tried several different placements of
> the sub-directory structure, but to no avail.  Anybody care to help me out?

Simple classpath stuff. If you have a class Foo in aaa/bbb, then it must
be in package aaa.bbb:

package aaa.bbb;
public class Foo {
	..
}

--Jeff