I'm trying to read an int header from the request in doGet() method.
But, on the browser I'm getting -1 for both the headers. Why is that so?
Any help shall be highly appreciated.
Thanks,
Reema
public int getIntHeader(java.lang.String name)
The default behavior of this method is to return getIntHeader(String name) on the wrapped request object.
Specified by:
getIntHeader in interface HttpServletRequest
Following copied from interface: javax.servlet.http.HttpServletRequest
Parameters:
name - a String specifying the name of a request header
Returns:
an integer expressing the value of the request header or -1 if the request doesn't have a header of this name
Throws:
java.lang.NumberFormatException - If the header value can't be converted to an int
Originally posted by Reema Patel:
Hello All,
I'm trying to read an int header from the request in doGet() method.
But, on the browser I'm getting -1 for both the headers. Why is that so?
Any help shall be highly appreciated.
Thanks,
Reema