---------------------------------------------------------------------------
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
---------------------------------------------------------------------------
----- Original Message ----- From: "Mann, Ivan H" <[EMAIL PROTECTED]>
To: <users@tomcat.apache.org>
Sent: Wednesday, October 31, 2007 10:25 PM
Subject: CLASSPATH, .jar files, packages, and so forth


----------------------------------------------------------------
Hi, I actually dont know where to start ;)

No... is probably a good place.

Why not try this, take the layout from a working web app with the packages manually installed...
   jar cvf webappname.WAR
Then to deploy, drop it into Tomcat.

There are so many differnet classloaders involved in what you doing that its just wrong...
WEB-INF/lib/ MUST NOT be in the Java classpath.
Yes it will work when you run from an external test program, but it will screw TC up nicely... never do that.

You seem to be using applets... those classes or Jars, are not in any class path... they in the web site and end up in the browsers classpath.
Makes no sense to put those in a class path in the server side...

Why fight the way its meant to be packaged.... why not just try get it into a war?

Good luck...


I have an application  that consists of >150 classes, organized in
several different packages.

In the past I have installed the application in
.../webapps/<appl>/<directories> where the directory tree corresponds
to the package layout, and this has worked fine.

I am trying to change this to using .jar files for a couple of
reasons.  I took one package and created a jar file like this:

cd webapps/<appl>/
jar cvf schedule.jar applet/schedule/*.class
mv schedule.jar WEB-INF/lib
rm applet/schedule/*.class

I modified setupclasspath.sh to read WEB-INF/lib and add all .jar
files to the CLASSPATH before starting tomcat.  Now when I try to
access one of the classes that I put into schedule.jar it throws a
NoClassDefFoundError.

If I run a test program with CLASSPATH pointing to the webapps/<appl>
directory and WEB-INF/lib/schedule.jar it works fine.  In tomcat it
doesn't find the class.  I would suspect that there an issue with the
way I build the jar file, but I can't figure out why it works outside
of tomcat but not inside.

What I would really like is a cookbook document telling me how to
distribute an application in jar files to the web.  I have Googled
many combinations of words and can't find one.  If anybody has one of
those I would really appreciate it.  I thing I am missing a step here,
possibly making the manifest, but I just don't know what that missing
step is.

Thanks for the help.

Ivan Mann




---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to