HttpServletRequest#getHeader(“User-Agent”) returns null browser name
I'm using Java 6. I have very less knowledge of JSP and Servlets. I'm using the following code to get browser name in which my application is running: String browserName = requestProvider.get().getHeader("User-Agent"); Also I'm using the following code to get IP address of the machine on which my application is running: String ipAdd = requestProvider.get().getRemoteAddr(); In both the cases requestProvider is a reference variable of type Provider<HttpServletRequest> . And I'm assured that it is never NULL . Now the problem is some times I get both values ( browserName and ipAdd ) NULL. I've