How to read the server host name from a mapped network drive?

J

John

Hi all,
for our project, the business wants to map a link to a resource (*.doc,
*.txt, *.ppt, etc.) by simply giving the Location from Windows XP, e.g.


S:\resources\department\protocols\protocol_24.doc

Of course the S:\ drive maps on our network with a given name. The user
wants simply to give such kind of location instead to type the real
server name and so on, because he doesn't have enough understand on how
to find out the server name.

So, I should solve this problem:

- given a drive letter from an user input, the web-application should
map the drive letter (let's say S:\) to a servername (e.g \\S014547) or
map the drive letter to the IP address of the server.

We use Websphere 5.1, RAD 6, JDK 1.4.2, J2EE1.4, Struts 1.1.
Client machines run Windows XP, Servers run on Solaris 9.

Can somebody suggest me please how to solve this problem?

Thank you very much for your help :)
John
 
C

Chris Uppal

John said:
- given a drive letter from an user input, the web-application should
map the drive letter (let's say S:\) to a servername (e.g \\S014547) or
map the drive letter to the IP address of the server.

If you know, or can find out, how to get that information out of Windows using
command-line programs (maybe net.exe can tell you it), then you could execute
that command as an external process (Runtime.exec() and its more advanced
friends) and parse the results in Java.

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top