Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
JSP - A mailing list about Java Server Pages specification and reference
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Subject: Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Subject: Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Subject: Re: CLASSPATH, .jar files, packages, and so forth

Subject: Re: CLASSPATH, .jar files, packages, and so forth

2007-11-01       - By Johnny Kewl

 Back

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
HARBOR: http://coolharbor.100free.com/index.htm
Now Tomcat is also a cool pojo application server
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --
-- -- Original Message -- --
From: "Mann, Ivan H" <ivan.mann@(protected)>
To: <users@(protected)>
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@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.