You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Mike Haberman <mi...@ncsa.uiuc.edu> on 2000/11/02 00:05:11 UTC

jar placement (clarification needed)

There was a thread a while back about where to place
application specific jar files.  I read the thread but
the solution has not worked.


I have a jar file (myApp.jar)

I have tomcat 3.2 running

I place myApp.jar in $TOMCAT_HOME/lib  it works!
   (but I don't want it to live there)

I place myApp.jar in webapps/myApp/WEB-INF/classes
   (it does not work unjarred or jarred)

I place myApp.jar in webapps/myApp/WEB-INF/lib
   (it does not work unjarred or jarred)


1.  What's up do I need to do something to server.xml or web.xml ?

2.  It is true that once this works, if I update the myApp.jar file
    I won't need to restart tomcat ?  (unlike if I do it the 1st way)


thanks to anyone who can help!!!


mike



Re: jar placement (clarification needed)

Posted by Jim Rudnicki <jd...@pacbell.net>.
> When you tried this, had you created a context named myApp
> in the server.xml file?  It is that context that associates
> jar files in webapps/myApp/WEB-INF/lib with the deployment
> descriptor in webapps/myApp/WEB-INF/web.xml

While that might resolve the problem, it strikes me as wrong.  I was under
the impression that the intent is that a .war is dropped in webapps/ and the
engine takes care of the rest.  You can see the contexts (contexti?) being
automatically created at startup.  If you have to edit server.xml, that
implies priviledges people would not have on some hosting services.

Jim


Re: jar placement (clarification needed)

Posted by William Brogden <wb...@bga.com>.

Mike Haberman wrote:
> 
> There was a thread a while back about where to place
> application specific jar files.  I read the thread but
> the solution has not worked.
> 
> I have a jar file (myApp.jar)
> 
> I have tomcat 3.2 running
> 
> I place myApp.jar in $TOMCAT_HOME/lib  it works!
>    (but I don't want it to live there)
> 
> I place myApp.jar in webapps/myApp/WEB-INF/classes
>    (it does not work unjarred or jarred)
> 
> I place myApp.jar in webapps/myApp/WEB-INF/lib
>    (it does not work unjarred or jarred)

When you tried this, had you created a context named myApp
in the server.xml file?  It is that context that associates
jar files in webapps/myApp/WEB-INF/lib with the deployment
descriptor in webapps/myApp/WEB-INF/web.xml 

-- 
WBB - wbrogden@bga.com  Chief Scientist, LANWrights, Inc.
Java Programmer Certification information and mock exam
at  http://www.lanw.com/java/javacert/