大家好
 
现在tomcat可以启动,但是localhost:端口号 这种方式没用,只有127.0.0.1:端口号有用,我想问一下,是不是两者都一样?如果存在不同的地方,还请告知,多谢

解决方案 »

  1.   

    此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
    楼主【wongshiang】截止到2008-07-04 11:27:11的历史汇总数据(不包括此帖):
    发帖的总数量:1                        发帖的总分数:0                        
    结贴的总数量:1                        结贴的总分数:0                        
    无满意结贴数:1                        无满意结贴分:20                       
    未结的帖子数:0                        未结的总分数:0                        
    结贴的百分比:100.00%               结分的百分比:---------------------
    无满意结贴率:100.00%               无满意结分率:---------------------
    敬礼!
      

  2.   

    C:\WINDOWS\system32\drivers\etc
    看看这个文件夹下面的 hosts 的文件 # copyright (c) 1993-1999 microsoft corp.
    #
    # this is a sample hosts file used by microsoft tcp/ip for windows.
    #
    # this file contains the mappings of ip addresses to host names. each
    # entry should be kept on an individual line. the ip address should
    # be placed in the first column followed by the corresponding host name.
    # the ip address and the host name should be separated by at least one
    # space.
    #
    # additionally, comments (such as these) may be inserted on individual
    # lines or following the machine name denoted by a '#' symbol.
    #
    # for example:
    #
    #      102.54.94.97     rhino.acme.com          # source server
    #       38.25.63.10     x.acme.com              # x client host127.0.0.1       localhost
    127.0.0.1       localyl
    127.0.0.1 你可以自己定义一个映射,比如,我定义的一个 127.0.0.1       localyl 下次我把 localhost 换成localyl 一样用!! 
      

  3.   

    你看下ini文件,应该是一样的.
      

  4.   

    localhost:端口号与127.0.0.0:端口号是一样的.
      

  5.   


    4楼正解!该文件把Localhost映射成127.0.0.1所以.用哪个都一样.
      

  6.   

    localhost:端口号与127.0.0.1:端口号是一样的.
      

  7.   

    只是一种域名解析
    可以在etc中配置域名,当你发起请求的时候 windows会首先检查自己的配置文件的,替换域名,如果没有对应的域名就会请求网络上的域名服务器。
    所以localhost配置了什么ip地址 就代表了什么
      

  8.   

    或许 你安装了其他软件 覆盖了你的 这个  HTTP://LOCALHOST:8080