• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Web application - access remote server

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author and jackaroo
Posts: 12199
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic