Tomcat 4.1.x and Symbolic Links

Alessandro A. Garbagnati

Additional info:
We've got an application that references data files in a directory outside of the webapps directory. We now can't access these files through a URL that contains symbolic links. We see in the release notes that this has purposefully been turned off. We've also found a thread on Google that indicates that there is a setting called 'allowlinks', but can't find where this is.
How do you get Tomcat 4.1.x to allow use of symbolic links ?
That is right: for "security" reasons, the basic behavior of Tomcat 4.1.x is to don't resolve a symbolic link and, as you have said, there is a way to activate it.

The allowLinking flag is an attribute of the <Resource/> tag, that is a child of the <Context/> tag.
If you look into the default server configuration file (server.xml) you can see an example of its use:

  <Context ...>
    <Logger ... />
    <Resources className="org.apache.naming.resources.FileDirContext"
            allowLinking="true" docBase="" />
Note: This feature doesn't work with Version earlier then 4.1.15