这个方法不赞成使用.估计sun把这个方法禁掉了.可以尝试用别的方法!

解决方案 »

  1.   

    request.getRemoteHost() 这样写可以吧!
      

  2.   

    你为什么要new
    不应使用new的
      

  3.   

    楼上的大哥,搞定啦。散分之前再问一个小问题:)
    代码:
    <%! private int accessCount=0;%>
    Access to page since server reboot;
    <%= ++accessCount >%
    报错如下:
    org.apache.jasper.compiler.ParseException: End of content reached while more parsing required: tag nesting error?
      

  4.   

    这样写呢?:Your host name:<%=request.getRemoteHost() %>