A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Software Craftsman
this week in the
Java in General
Web application - access remote server
Joined: Dec 19, 2006
Dec 20, 2006 09:19:00
I am running a local (localhost) web application that needs to access a VSS installation on a remote machine via a DOS command line on my local machine.
I have written the
(Runtime.exec etc) to run the DOS command. But evidently I get an "access is denied" error when the command line tries to access the remotely installed VSS ini file.
My question is this - how can i work out what user my java web app is running as? Or is there a way of making the webapp impersonate my user rights for this connection?
if i can find this out then i can get my IT department to give this user rights to access the remote machine.
Thanks in advance
author and jackaroo
Joined: Mar 28, 2003
Dec 24, 2006 14:09:00
It sounds like you have solved your problem in your other posts, but just to provide an answer to this one ...
Typing "SET" at the command prompt will provide you with all the environmental variables that the current environment knows about.
So all you need do is run the set command through your call to Runtime.exec within
, and you should be able to see the user that Tomcat is currently running as.
The Sun Certified Java Developer Exam with J2SE 5:
paper version from Amazon
PDF from Apress
, Online reference:
I agree. Here's the link:
subject: Web application - access remote server
Security Principal Problem, local and remote
VSS and ANT
build failed for the ant task - vssget
create web application to intereact VSS database without client installation
Using VSS through ant
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015