tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Symbolically linked jar files in WEB-INF/lib
Date Tue, 29 Apr 2003 05:37:31 GMT
Actually, it gets asked about every other day on this list :).

In your context configuration you need something like:
   <Context path="/myApp" docBase="myApp" debug="0">
       <Resources className="org.apache.naming.resources.FileDirContext"
              allowLinking="true"  />
   </Context>

With the default catalina.policy, this still won't work if your jar is
outside of the web-app, and you are running "-security".  In this case you
also need to edit catalina.policy to grant rights to the file.

"Sasha Borodin" <sasha@whoissasha.com> wrote in message
news:BAD339DA.A201%sasha@whoissasha.com...
> I apologize in advance if I have overlooked this issue in documentation -
I
> have searched both the docs and the newsgroups extensively for this...
>
> I'm trying to keep just one master copy of any one of my jar files, and
> symbolic links pointing to it where needed - in this case, specifically
from
> a webapp's WEB-INF/lib directory.
>
> But this causes an exception to be thrown during Tomcat start-up:
>
> ---begin paste of localhost_log
>
> 2003-04-28 12:22:30 ContextConfig[/da] Exception processing JAR at
resource
> path /WEB-INF/lib/cos.jar
> javax.servlet.ServletException: Exception processing JAR at resource path
> /WEB-INF/lib/cos.jar
> <followed by stack trace>
> ----- Root Cause -----
> java.lang.IllegalArgumentException: Invalid TLD resource path
> /WEB-INF/lib/cos.jar
> <another stack trace>
>
> 2003-04-28 12:22:30 ContextConfig[/da]: Marking this application
unavailable
> due to previous error(s)
>
> ---end paste of localhost_log
>
> When I create a WAR of a webapp, jar automatically follows symbolic links,
> and thus the original jar files are added to the archive.  However, I find
> it much more convenient to keep the webapp expanded during development.
>
> Here's some stats on my system:
> OS:     MacOS X (10.2.5)
> Tomcat: 4.1.24
>
> Is there a setting in server.xml that I have overlooked for following
> symbolic links?  Or is what I'm trying to do not allowed?  I'm surprised I
> didn't see anyone ask this question already...
>
> Thank you,
>
> -Sasha Borodin




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message