On 15/10/11 23:27, Caldarale, Charles R wrote:
From: Brian Burch [mailto:br...@pingtoo.com]
Subject: Re: WebApp access to a LAN share
Well, for a start a webapp is not normally allowed to access
files outside its own container...
Unless you've configured Tomcat to use a security manager, that's simply false;
webapps run under the same userid and access rights that all of Tomcat does.
Even if you have a security manager, it's fairly trivial to configure it to
allow a given webapp to access whatever it needs to.
You can get "outside that container" with a context.xml docbase
element, but I can see that won't work for you because you are
talking as if you have/need most of your webapp within the container.
This has nothing to do with what the OP was asking; what you're describing is
how to locate a _webapp_ outside of the Tomcat directory structure, not just
data the webapp wants to access.
The only way I know to access data outside the container
(under linux) is to define a linux symlink from inside the
container to a directory path outside the container.
I think you're confusing client access to resources on the server with webapp
access to data files; they are completely independent.
- Chuck
I was trying to be helpful, but was also in a hurry, so I didn't analyse
the question closely enough.
Just for the record, my comments were based on an experience several
years ago. Tomcat 5.x was running under sun jdk 1.4.x. It was running as
root, was NOT chrooted, and yet my webapp could not access files outside
the container until I did the "symlink trick".
I accept all you say above, but I wasn't dreaming. Perhaps I was
inadvertently hindered by a SecurityManager as you suggest, but there is
no benefit in discussing or analysing that historical problem further.
Thanks for preventing me from causing unwanted confusion.
Brian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org