62,614
社区成员
发帖
与我相关
我的任务
分享
import=“com.helloweenvsfei.util.ip.IPSeeker"
但是我不知道怎么修改!!请大家帮帮忙!<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ page import="com.helloweenvsfei.util.ip.IPSeeker" %>
<%!
private IPSeeker ipSeeker=IPSeeker.getInstance();//全局变量
public String getArea(String ip){//查询ip所在的地区
return ipSeeker.getArea(ip);
}
public String getCountry(String ip){//查询ip所在国家
return ipSeeker.gerCountry(ip);
}
public boolean isValidIp(String ip){
return ip!=null&&ip.trim().matches("^[0-9]+\\.[0-9]+\\.[0-9]+\\/[0-9]+$");
}
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>IP 地址查询</title>
</head>
<body>
</body>
</html>
public String getCountry(String ip){//查询ip所在国家
return ipSeeker.gerCountry(ip); //改为 return ipSeeker.getCountry(ip);
}
public String getCountry(String ip){//查询ip所在国家
return ipSeeker.gerCountry(ip); //改为 return ipSeeker.gerCountry(ip)
}
这儿是一处错误