problem with file access in other computer in jsp

L

lgj573

I have problem with file accessing in other computer in jsp.
The follow code
File folder=new File("Z:"+File.separator+"sharefolder");//Z is a net
share driver
File[] files=folder.listFiles();
System.out.println("test");
System.out.println("length="+files.length);
will throw exception at the second print.
but it works well in main funtion.
Is anybody know what is the problem.
JSP works on windows2003 server,tomcat 5.0.28 JDK1.4 net share folder
on windows2000 server
 
O

Oliver Wong

I have problem with file accessing in other computer in jsp.
The follow code
File folder=new File("Z:"+File.separator+"sharefolder");//Z is a net
share driver
File[] files=folder.listFiles();
System.out.println("test");
System.out.println("length="+files.length);
will throw exception at the second print.
but it works well in main funtion.
Is anybody know what is the problem.
JSP works on windows2003 server,tomcat 5.0.28 JDK1.4 net share folder
on windows2000 server

What's the exception? See
http://riters.com/JINX/index.cgi/Su...estions_20on_20Newsgroups#RepeatErrorsExactly

- Oliver
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top