Headers must be set before the response is committed. If headers are set after the response is committed, that will be ignored by the servlet container.
getHeader: returns a header value by given header name If there are multiple headers with the same name, it returns the first head in the request.
getHeaders: returns all the header values associated with the given header name (Enumeration of Strings)
getHeaderNames : returns names of all the headers
getIntHeader: returns header value (String) into int format If it cannot translate the header value to an int, a NumberFormatException is thrown.
getDateHeader: returns header value (String) into Date format If it cannot translate the header to a Date object, an IllegalArgumentException is thrown.
public String getInitParameter(String)returns a String containing the value of the named initialization parameter, or null if the parameter does not exist.
public Enumeration getInitParameterNames()returns the names of the servlet’s initialization parameters as an Enumeration of String objects.