是Apple Webkit用户代理
import java.util.Map; import javax.faces.context.FacesContext; /** 来 自 N o w J a v a . c o m - 时 代 Java**/ public class Main{ public static void main(String[] argv) throws Exception{ System.out.println(isAppleWebkit()); } public static boolean isAppleWebkit() { // both Opera and Google Chrome does not like CData final Map<String, String> headerMap = FacesContext .getCurrentInstance().getExternalContext() .getRequestHeaderMap(); final String userAgent = headerMap.get(