You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Randy Paries <ra...@unitnet.com> on 2005/03/04 22:51:18 UTC

Help with tomcat on windoze/nfs

Hello,

I have the unfortunate opportunity of having to set up tomcat on windoze
(sorry I am a linux bigot)

I have this servlet that has to run a windows program. (that works fine)

I have to create a directory on a NFS mount.

In my test servlet, I have this snippet of code(see below)

If I do /myservlet?&dir=c:/  (is see it ok)
If I do /myservlet?&dir=z:/  (z is a mapped nfs mount, it does not see it)

Here is the kicker, I wrote a little class that was basically the same but
just a normal
Java app, and it see z:/ OK

Help???

Thanks


	===========================================================
	  //DIR is a param passed in        

	  PrintWriter out = null;
        res.setContentType("text/html");
        out = new PrintWriter (res.getOutputStream());

        out.println( "looking for dir "+DIR+"<BR>");

        File fpath = new File(DIR);
        out.println("path-->"+fpath.getAbsolutePath());
        if ( !fpath.exists() ){
            out.println("Does not exist");
        }else{
            out.println("exist!!!!");
        }
        out.close();
	
	===========================================================



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


Re: Help with tomcat on windoze/nfs

Posted by Jason Bainbridge <jb...@gmail.com>.
On Fri, 4 Mar 2005 15:51:18 -0600, Randy Paries
<ra...@unitnet.com> wrote:
> Hello,
> 
> I have the unfortunate opportunity of having to set up tomcat on windoze
> (sorry I am a linux bigot)
> 
> I have this servlet that has to run a windows program. (that works fine)
> 
> I have to create a directory on a NFS mount.

>From memory no matter what you try a mapped drive won't work but I
believe if you use the UNC name ie. \\Server\Share and then run Tomcat
under an account that has Network privileges and access to that share
so LocalSystem won't be good enough.

Regards,
-- 
Jason Bainbridge
http://kde.org - webmaster@kde.org
Personal Site - http://jasonbainbridge.com

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


Re: Help with tomcat on windoze/nfs

Posted by Parsons Technical Services <pa...@earthlink.net>.
How are you starting Tomcat?

Doug
----- Original Message ----- 
From: "Randy Paries" <ra...@unitnet.com>
To: "'Tomcat Users List'" <to...@jakarta.apache.org>
Sent: Friday, March 04, 2005 11:57 PM
Subject: RE: Help with tomcat on windoze/nfs


>I assume the map is ok, since I can run a java app and it works fine, It is
> only when I call it from a servlet it does not
>
> Thanks
>
> -----Original Message-----
> From: Mike Curwen [mailto:g_dev9xq@globallyboundless.com]
> Sent: Friday, March 04, 2005 4:15 PM
> To: 'Tomcat Users List'
> Subject: RE: Help with tomcat on windoze/nfs
>
> How is the drive mapped? By what logged-in windows user?  Is it the same
> user that Tomcat is running as, and are you sure?  ;)
>
> Mike Curwen
>
>
>> -----Original Message-----
>> From: Randy Paries [mailto:randy.paries@unitnet.com]
>> Sent: Friday, March 04, 2005 3:51 PM
>> To: 'Tomcat Users List'
>> Subject: Help with tomcat on windoze/nfs
>>
>>
>> Hello,
>>
>> I have the unfortunate opportunity of having to set up tomcat on
>> windoze (sorry I am a linux bigot)
>>
>> I have this servlet that has to run a windows program. (that works
>> fine)
>>
>> I have to create a directory on a NFS mount.
>>
>> In my test servlet, I have this snippet of code(see below)
>>
>> If I do /myservlet?&dir=c:/  (is see it ok) If I do
>> /myservlet?&dir=z:/  (z is a mapped nfs mount, it does not see it)
>>
>> Here is the kicker, I wrote a little class that was basically the same
>> but just a normal Java app, and it see z:/ OK
>>
>> Help???
>>
>> Thanks
>>
>>
>> ===========================================================
>>   //DIR is a param passed in
>>
>>   PrintWriter out = null;
>>         res.setContentType("text/html");
>>         out = new PrintWriter (res.getOutputStream());
>>
>>         out.println( "looking for dir "+DIR+"<BR>");
>>
>>         File fpath = new File(DIR);
>>         out.println("path-->"+fpath.getAbsolutePath());
>>         if ( !fpath.exists() ){
>>             out.println("Does not exist");
>>         }else{
>>             out.println("exist!!!!");
>>         }
>>         out.close();
>>
>> ===========================================================
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> 



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


RE: Help with tomcat on windoze/nfs

Posted by Randy Paries <ra...@unitnet.com>.
I assume the map is ok, since I can run a java app and it works fine, It is
only when I call it from a servlet it does not

Thanks 

-----Original Message-----
From: Mike Curwen [mailto:g_dev9xq@globallyboundless.com] 
Sent: Friday, March 04, 2005 4:15 PM
To: 'Tomcat Users List'
Subject: RE: Help with tomcat on windoze/nfs

How is the drive mapped? By what logged-in windows user?  Is it the same
user that Tomcat is running as, and are you sure?  ;)

Mike Curwen


> -----Original Message-----
> From: Randy Paries [mailto:randy.paries@unitnet.com]
> Sent: Friday, March 04, 2005 3:51 PM
> To: 'Tomcat Users List'
> Subject: Help with tomcat on windoze/nfs
> 
> 
> Hello,
> 
> I have the unfortunate opportunity of having to set up tomcat on 
> windoze (sorry I am a linux bigot)
> 
> I have this servlet that has to run a windows program. (that works 
> fine)
> 
> I have to create a directory on a NFS mount.
> 
> In my test servlet, I have this snippet of code(see below)
> 
> If I do /myservlet?&dir=c:/  (is see it ok) If I do 
> /myservlet?&dir=z:/  (z is a mapped nfs mount, it does not see it)
> 
> Here is the kicker, I wrote a little class that was basically the same 
> but just a normal Java app, and it see z:/ OK
> 
> Help???
> 
> Thanks
> 
> 
> 	===========================================================
> 	  //DIR is a param passed in        
> 
> 	  PrintWriter out = null;
>         res.setContentType("text/html");
>         out = new PrintWriter (res.getOutputStream());
> 
>         out.println( "looking for dir "+DIR+"<BR>");
> 
>         File fpath = new File(DIR);
>         out.println("path-->"+fpath.getAbsolutePath());
>         if ( !fpath.exists() ){
>             out.println("Does not exist");
>         }else{
>             out.println("exist!!!!");
>         }
>         out.close();
> 	
> 	===========================================================
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


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





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


RE: Help with tomcat on windoze/nfs

Posted by Mike Curwen <g_...@globallyboundless.com>.
How is the drive mapped? By what logged-in windows user?  Is it the same
user that Tomcat is running as, and are you sure?  ;)

Mike Curwen


> -----Original Message-----
> From: Randy Paries [mailto:randy.paries@unitnet.com] 
> Sent: Friday, March 04, 2005 3:51 PM
> To: 'Tomcat Users List'
> Subject: Help with tomcat on windoze/nfs
> 
> 
> Hello,
> 
> I have the unfortunate opportunity of having to set up tomcat 
> on windoze (sorry I am a linux bigot)
> 
> I have this servlet that has to run a windows program. (that 
> works fine)
> 
> I have to create a directory on a NFS mount.
> 
> In my test servlet, I have this snippet of code(see below)
> 
> If I do /myservlet?&dir=c:/  (is see it ok)
> If I do /myservlet?&dir=z:/  (z is a mapped nfs mount, it 
> does not see it)
> 
> Here is the kicker, I wrote a little class that was basically 
> the same but just a normal Java app, and it see z:/ OK
> 
> Help???
> 
> Thanks
> 
> 
> 	===========================================================
> 	  //DIR is a param passed in        
> 
> 	  PrintWriter out = null;
>         res.setContentType("text/html");
>         out = new PrintWriter (res.getOutputStream());
> 
>         out.println( "looking for dir "+DIR+"<BR>");
> 
>         File fpath = new File(DIR);
>         out.println("path-->"+fpath.getAbsolutePath());
>         if ( !fpath.exists() ){
>             out.println("Does not exist");
>         }else{
>             out.println("exist!!!!");
>         }
>         out.close();
> 	
> 	===========================================================
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 


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