Mark,
Thank you. I subscribe to both lists as my system uses Tomcat (sometimes
Jetty) and MySQL with Servlets to do it's work. However, you were the
first person to reply!
Thanks for the answer - even if it is from the wrong list! :-)
Cheers,
-Richard
Mark Matthews wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Richard S. Huntrods wrote:
I need to access a specific directory from within tomcat, but I'm having
a specific problem and require some advice.
I have a link to a file in the servlet, something like
https://myserver.com/special-directory/file.zip;
If I create the directory as follows:
/export/home/tomcat/webapps/ROOT/special-directory/ and put file.zip
in that directory, it all works perfectly.
HOWEVER, if instead of creating the actual directory, I create a
symbolic link to a different directory
(i.e. in ROOT I type ln -s /export/home/myfiles/directory
special-directory, the linked directory appears, and (in unix) I can
see/access the files. BUT - tomcat no longer finds the files, even
though the linked directory has the required name and files.
Is there some way to make tomcat see a linked directory?
The problem is that the servlets are writing a data file for offline use
in one directory, and then I was hoping to symbolically link that
directory under ROOT so the user could access it. Worst case, I guess I
could write to ROOT/special-directory, but I didn't really want the
user files stored there - just a link. Since these files are created on
the fly, a hard link won't work.
Thanks very much in advance,
-Richard
Richard,
Your question is probably best answered on a tomcat mailing list, not a
MySQL one, however
You need to add 'allowLinking' to your context to tell Tomcat to follow
symlinks, see
http://jakarta.apache.org/tomcat/tomcat-5.0-doc/config/context.html for
more info.
Regards,
-Mark
- --
Mr. Mark Matthews
MySQL AB, Software Development Manager, J2EE and Windows Platforms
Office: +1 708 332 0507
www.mysql.com
Meet the MySQL Team! April 14-16, 2004 http://www.mysql.com/uc2004/
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFAaD5LtvXNTca6JD8RAiyCAKCKJozUlFICI84kIyj6kiJm0sMPzACgglcM
VP3092UrQa/+/VjRQ4eW7SA=
=R5wg
-END PGP SIGNATURE-
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]