Link to home
Start Free TrialLog in
Avatar of Mark
Mark

asked on

allowLinking - making Unix symlinks work with tomcat

============================
I have installed tomcat 6.0.14 on my Linux 2.4.29 kernel. The tomcat RELEASNOTES contain the following:

Symlinking static resources:
============================
By default, Unix symlinks will not work when used in a web application to link
resources located outside the web application root directory.

This behavior is optional, and the "allowLinking" flag may be used to disable
the check.

I am using symlinks for various aspects of the tomcat installation. I haven't run into a problem so far, but I'd rather be safe than sorry. Where do I find this elusive "allowLinking" flag? The RELEASE-NOTES.txt simply says it exists, but apparently assumes the reader knows where. I see references to it in ./webapps/docs/config/printer/context.html and ./webapps/docs/config/context.html, but these just appear to be documentation, not configuration.

Where, and how do I set it?
Avatar of Ajay-Singh
Ajay-Singh

Avatar of Mark

ASKER

Thanks! As my Author line shows, I'm a beginner in this area (you helped me on a previous question). Your link indicates that it is an atribute I can put in context.html; and if I put it in my $CATALINA_HOME/conf/context.xml it will apply to all webapps. That's what I want. Unfortunately, I see no examples of how to specity this attribute (I'm new at xml as well). Below is my actual as-shipped .../conf/context.xml. I've attempted to put allowLinking in there. Please correct:

<!-- The contents of this file will be loaded for each web application -->
<Context>

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <allowLinking>true</allowLinking>
</Context>

ASKER CERTIFIED SOLUTION
Avatar of Ajay-Singh
Ajay-Singh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mark

ASKER

ah ha! Got it. OK, I've put it in my .../conf/context.xml. I don't know if I can test it or not. I'll just assume it works until something tells me otherwise. Thanks!