• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Web application - access remote server

 
Matthew Hersee
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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 java (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

Matt
 
Andrew Monkhouse
author and jackaroo
Marshal Commander
Pie
Posts: 11854
185
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Matthew,

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 Tomcat, and you should be able to see the user that Tomcat is currently running as.

Regards, Andrew
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic