Java examples for javax.servlet.http:HttpServletRequest
is Mozilla from HttpServletRequest
import javax.servlet.http.HttpServletRequest; public class Main{ // w w w . java2s.c o m public static boolean isMozilla(HttpServletRequest request) { String agent = getAgent(request); if (null != agent && -1 != agent.indexOf("Mozilla")) { return true; } return false; } public static String getAgent(HttpServletRequest request) { return request.getHeader("USER-AGENT"); } }