*
The moose likes Tomcat and the fly likes symbolic link directory within webapp directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "symbolic link directory within webapp directory" Watch "symbolic link directory within webapp directory" New topic
Author

symbolic link directory within webapp directory

Fred Rogan
Greenhorn

Joined: Nov 16, 2003
Posts: 9
I have set up a web application in a directory outside of the webapps directory on a unix box and created a symbolic link to the directory within the webapps directory. ie. directory is '/home/fitcorp/fitcorpdev/'
with a symbolic link 'webapps/dev'.

I have added the new application to the server.xml document for tomcat and when I start tomcat 4.1 it recognises the application and creates no errors in the log files. However when I try to access a servlet in the application it writes to the log file that it has started the application using the default directory structure and cannot access the web.xml file. The application throws an error stating it cannot access the servlet.

I'm not sure why it is trying to start the application again. Is it something to do with having a symbolic link in the directory?

If anyone can offer any suggestions they would be greatly appreciated
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Did you set the "allowLinking" attribute to true?

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Fred Rogan
Greenhorn

Joined: Nov 16, 2003
Posts: 9
Thanks Ben.

allowLinking was not included in my context tag, default is false. When I added it and set it to true my problems were resolved.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: symbolic link directory within webapp directory