tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Isaacs" <Larry.Isa...@sas.com>
Subject RE: CLASSPATH, .jar files, packages, and so forth
Date Thu, 01 Nov 2007 15:44:02 GMT
Classes downloaded to the client browser for execution is just
static content as far as Tomcat is concerned.  Modifying the server's
or webapp's "classpath" isn't going to make any difference.  It's
the client browser's "classpath" that needs adjusting to use the jar.
This means modifying the HTML that runs the applet.  Unfortunately,
or perhaps fortunately, it has been many years since I have messed
with such HTML, so I can't say what those modifications would look
like.  Likely something in the HTML has to point at the jar where
it lives in the content portion of the webapp.  HTH.

Cheers,
Larry

> -----Original Message-----
> From: Mann, Ivan H [mailto:ivan.mann@eds.com]
> Sent: Wednesday, October 31, 2007 4:26 PM
> To: users@tomcat.apache.org
> Subject: CLASSPATH, .jar files, packages, and so forth
> 
> 
> 
> 
> 
> > 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message