getQueryString()是错误的 public java.lang.String getQueryString() Returns the query string that is contained in the request URL after the path. This method returns null if the URL does not have a query string. Same as the value of the CGI variable QUERY_STRING.
Returns the query string that is contained in the request URL after the path. This method returns null if the URL does not have a query string. Same as the value of the CGI variable QUERY_STRING.
http://www.asuslife.com/network/asp/jsp1-20010104-001.htm
import java.net.*; try
{
InetAddress Address = InetAddress.getLocalHost();
String Addr = Address.getHostAddress();
System.out.print(Addr);
}
catch(Exception e)
{
System.out.print(e.getMessage());
}
getHostAddress();