That's because Tomcat or your servlet container is running as a different
user as you are within your own desktop.  I ran into the same problem before
and you basically have to get the user/account that the tomcat process runs
under to be mapped to drive "F".


-----Original Message-----
From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 07, 2004 6:01 PM
To: [EMAIL PROTECTED]
Subject: [OT] reading pdf file from mapped network drive in servlet

Hi
I am running tomcat on my windows 2000 machine 
and i have mapped a network drive to it
I am trying to read a pdf file from the network drive,
and it is giving me access denied error
my servlet code is
File file = new File("F:\\chart\\test.pdf");
System.out.println(file.exists()); (output is false)

How do i read this file, this code works fine in
standalone program, but fails in servlet

Ashish

__________________________________
Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
http://hotjobs.sweepstakes.yahoo.com/signingbonus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to