Hmmm - I use JNDI for connections and you lost me with extra paths - although 
it appears this is exactly what I want.


<Context path="/mywebapp" docBase="/Users/theuser/mywebapp/src/main/webapp" > 
<Resources className="org.apache.naming.resources.VirtualDirContext" 

extraResourcePaths="/WEB-INF/classes=/Users/theuser/mywebapp/target/classes,/pictures=/Users/theuser/mypictures,/movies=/Users/theuser/mymovies"/><Context
 path="/mywebapp" docBase="/Users/theuser/mywebapp/src/main/webapp" > 
<Resources className="org.apache.naming.resources.VirtualDirContext" 

extraResourcePaths="/WEB-INF/classes=/Users/theuser/mywebapp/target/classes,/pictures=/Users/theuser/mypictures,/movies=/Users/theuser/mymovies"/>

This is exactly what I was thinking, I will start digging to learn how to use 
properly.


Thanks Mark




On Sunday, December 15, 2013 4:53 PM, Martin Gainty <mgai...@hotmail.com> wrote:
 

  


> Date: Sun, 15 Dec 2013 12:41:55 -0800
> From: its_toas...@yahoo.com
> To: users@tomcat.apache.org
> Subject: Re: linking (limiting???)
> 
> On 12/15/2013 8:34 AM, Ray Holme wrote:
> > I am a Linux user and love linking things to reduce copies.
> >
> > Apache/Tomcat (by default) does not allow symbolic linking (nice as
> > it can cross mounted file systems) except in the top apache/lib
> > directory. I use hard links in the Application/WEB-INF/lib
> > directories to reduce copying and help me manage things.
> >
> > HOWEVER, some applications have special needs - e.g. pictures. You
> > don't want to always distribute these with the release of the
> > application (Application.war file), so symbolic links are the way to
> > go (except for MS land, sorry). The nice solution to this is:
> > .../webapps/Application/WEB-INF/context.xml which must contain at
> > least the two below lines:
> >
> > <?xml version="1.0" encoding="UTF-8"?> <Context allowLinking="true">
> > </Context>
> >
> >
> > However this allows ALL symbolic linking in the Application
> > directory. I agree with the developers that this is dangerous.
> >
> > Is there some way to allow linking in just ONE sub-directory of the
> > Application?? - e.g.
> >
> > .../webapps/Application/images
> >
> > This would allow all I need to have local images for the application
> > without endangering other things using a symbolic link.
> >
> 
> If you use Tomcat 7, read the following:
> 
> http://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Resource_Definitions

<MG>...Mark I assume you're referring to Virtual DirContext...?
<Context path="/mywebapp" docBase="/Users/theuser/mywebapp/src/main/webapp" > 
<Resources className="org.apache.naming.resources.VirtualDirContext" 

extraResourcePaths="/WEB-INF/classes=/Users/theuser/mywebapp/target/classes,/pictures=/Users/theuser/mypictures,/movies=/Users/theuser/mymovies"/>
<MG>

> . . . just my two cents
> /mde/
MG>Thanks Mark, 

> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

Reply via email to