tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ajay Garg <ajaygargn...@gmail.com>
Subject how to allow remote login in tomcat ?
Date Tue, 26 Aug 2008 10:37:31 GMT

Hi all.

I am building an application that requires the copying of a file on a mapped
network drive on a Windows XP machine. The network drive is always in mapped
state.

Now, copying the file through a standalone Java program works fine (using
the concept of FileInputStream and FileOutputStream), as long as the network
drive is in mapped state. For eg, if I need to copy a file abc.pdf to a
network drive Z:, mapped to \\server\test, the file is copied. The skeleton
code is :

			
1 FileInputStream from = new FileInputStream(new File("D:\\test_copy.pdf"));
2 FileOutputStream to = new FileOutputStream(new
File("\\\\server\\test\\test_copy_on_server));
3 Logic to copy the file .....

However, when I deploy the code on a Tomcat server, it shows an exception at
line 2 :

java.io.FileNotFoundException : Access is denied	    		

I did a bit of research, and it seems that 

a) Everything works fine in case 1, because the local machine is able to
login into the shared folder (through the mapped drive, or elsewise .. I am
not sure)
b) In Tomcat deployment, Tomcat needs the credentials to login into the
shared folder (the fact that the
the network folder has already been mapped onto a drive SUPPOSEDLY does not
help ...)

I believe, it's got to do with tomcat configuration ...

Any ideas please ... I will be grateful.

Ajay Garg
-- 
View this message in context: http://www.nabble.com/how-to-allow-remote-login-in-tomcat---tp19158789p19158789.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


Mime
View raw message