How Symlinks allow linking and working with Tomcat
I have read that symlink allows linking with the point at the directory files, and it also works with the Tomcat, and it also provides the web application to link resources located outside the web application root directory. In my college workshop symlinks were used for various aspects of the tomcat installation. but i have never done that myself and therefore eager to know more about the symlink so if anyone has any information please let me know.
Re: How Symlinks allow linking and working with Tomcat
Following are the way where we create a context.xml file in a WEB-INF directory to run run your web application.
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/myapp" allowLinking="true">
</Context>
Re: How Symlinks allow linking and working with Tomcat
Tomcat follow symbolic links—and it’s very easy! All you have to do is add allowLinking="true" to the Context tag in the context.xml file. It's always better to actually install the files (usually in a .war) to the server directly instead of using links. This allows you to "hot-deploy" and "hot-undeploy" (I think Tomcat supports this now) by copying and removing the .war file. For Tomcat 5.5 and later, I find the most convenient way is to have a META-INF directory in the web application directory and have a context.xml file in this. Like this all the files to do with the web application are in the same place and copying and deploying is easy. So, context.xml looks like the following:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/myapp" allowLinking="true">
</Context>
Re: How Symlinks allow linking and working with Tomcat
When using a shared webhosting environment, it is recommended that usage of context.xml inside a WAR is forbidden (using the deployXML attribute of the Host element)”. I would suggest creating a "tomcat group" in the "system-settings"->"users and groups". (or you could "man /etc/group" and manually add a line to the "/etc/group" file, something like this. Presumably this is because it would allow badly behaved configurations to be loaded.