public static String getParameterIgnoreCase ( HttpServletRequest req , String paramName ) { Enumeration e = req . getParameterNames ( ) ; while ( e . hasMoreElements ( ) ) { String s = ( String ) e . nextElement ( ) ; if ( s . equalsIgnoreCase ( paramName ) ) return req . getParameter ( s ) ; } return null ; }
Return the value of the given parameter for the given request . Should only be used if the parameter is known to only have one value . If used on a multi - valued parameter the first value is returned .