Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing a file to a network via the IP address

Status
Not open for further replies.

LittleWing

Programmer
May 31, 2001
191
0
0
NL
Alright boyz and girls, here one to get you thinking.

The issue
I have a servlet to process a request. This request generates a flat file as output. I want to place the flat file on the users machine in a shared folder. Note, this machine will always be part of the LAN.

The usual excuse :)
The code i wrote works perfectly on my own machine, writing to my machine, but when executing on the server, trying to write to my machine, it fails.

FileOutputStream out = new FileOutputStream( "\\\\" + request.getRemoteAddr() + "\\download\\contacts.txt");

I also tried using the machine name instread of the IP address but to no avail.

So, what i really want to know is this: does this sort of file naming work? Any suggestions??
 
FYI, its not the file naming thats causing the problem. Something with the iPlanet installation runnning on that machine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top