views:

28

answers:

1

Hi,

I want to access the network files from my web application.

I have build the web application (which access network share folder and files) and its works perfectly under eclipse.

The same application doesn't run if run through web server Tomcat 6.0

   String lineSeparator = System.getProperty("file.separator");
   String path1=lineSeparator.concat(lineSeparator).concat("188.10.1.5").concat(lineSeparator).concat("aps3b2-share").concat(lineSeparator).concat("tiger").concat(lineSeparator);
   File pathtest1 = new File(path1);
   if (pathtest1.exists())
   {
     fullpath = lineSeparator.concat(lineSeparator).concat("188.10.1.5").concat(lineSeparator).concat("aps3b2-share").concat(lineSeparator).concat("tiger").concat(lineSeparator);
   }
   else
   {
     errmount="Please Mount the APS 3B2 Share using //188.10.1.5 on this system and then login!!!.";

errval=1; } System.out.println("In login"+fullpath);

Actually, i want to get the modified date and time of the file from the file server to upload. Hence, i am checking whether the web application can access the root folder of the server to access the file.

But, this works perfectly under Eclipse but when i put as a WAR file in Tomcat 6.0 it doesn't work.

I have tried UNCPath, backslash and forward slash with no result.

Could you please anyone help on this?

Many thanks in advance, Kotteeswaran