tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: Remote resources
Date Tue, 18 Nov 2014 16:38:34 GMT
On 18/11/2014 17:22, Ed Rouse wrote:
> 
> 
>> -----Original Message-----
>> From: phiroc@free.fr [mailto:phiroc@free.fr]
>> Sent: Tuesday, November 18, 2014 10:02 AM
>> To: users@tomcat.apache.org
>> Subject: Remote resources
>>
>> Hello,
>>
>> is there a way to access the contents of a directory (e.g., images) on
>> a remote [Windows] network drive, which is mounted on a Linux
>> filesystem (e.g., /mnt/myremotedrive), from a Java application running
>> on a Tomcat Server?
>>
>> What makes this task problematic is the fact that the images are stored
>> in a location which is not normally accessible by Tomcat
>> (/mnt/myremotedrive), or by its applications.
>>
>> Many thanks.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
> 
> There is, but it's not easy. You need to create a custom class loader 
> that extends WebappClassLoaderBase, then create a DirResourceSet and 
> add it to the root.

No, you do not need a custom class loader to do this.

If the Tomcat process can read the files then you can add them via the
new (for Tomcat 8) resources configuration.

If the Tomcat process can't read the files them there is nothing you can
do in Tomcat to change that.

Mark


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message