wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes locaalhost vs 127.0.0.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "locaalhost vs 127.0.0.1" Watch "locaalhost vs 127.0.0.1" New topic
Author

locaalhost vs 127.0.0.1

Shay Gaghe
Ranch Hand

Joined: Sep 03, 2001
Posts: 102
Hi
In developing a server based program I use http://127.0.0.1 to refer the object sources , I know the �localhost� does smilar thing but im not sure. Can you all expose a little more about it ?
Thank in advance
Shay
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
"localhost" is basically a user friendly name for the IP address 127.0.0.1. It shouldn't matter which one you use.
Matthew Phillips


Matthew Phillips
Shay Gaghe
Ranch Hand

Joined: Sep 03, 2001
Posts: 102
ok..i thought so..but how can i changhe it or in other words to reffer it to other place in the file system?
thanks
Originally posted by Matthew Phillips:
"localhost" is basically a user friendly name for the IP address 127.0.0.1. It shouldn't matter which one you use.
Matthew Phillips

Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
http:\\localhost\< filename >


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Shay Gaghe
Ranch Hand

Joined: Sep 03, 2001
Posts: 102
Originally posted by Marilyn deQueiroz:
http:\\localhost\< filename >

thanks for your reply
i mean.. the "localhost" in my computer reffer to the ASP engine root directory , i want that the "localhost" will reffer to C:/images how can i set it?
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

'localhost' is like a java language keyword, only in networking.

localhost refers to the root of the webserver that is running on the machine in which you type 'localhost', most likely IIS. IIS, when it receives a request for an .asp page, will retrieve the file from the filesystem, run it through asp.dll, and then serve the results.

If you want a single word to refer to a place on your harddrive, then you need to investigate aliases. I know you can do this with Tomcat, iWS, etc... not sure of how to do the same in IIS.
Marilyn de Queiroz
Sheriff

Joined: Jul 22, 2000
Posts: 9044
    
  10
It can be done in IIS. However it's kinda complicated and I don't have access to my IIS box right now. You need to create a "virtual directory". It's an IIS (or whatever server you are using) thing, not a Java thing.

[This message has been edited by Marilyn deQueiroz (edited September 21, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: locaalhost vs 127.0.0.1
 
Similar Threads
sending emails from servlet
Taking the port connection off the url
Acccess denied
Replacing the root context
starting problem of tomcat