public static float getFloatParameter(final ServletRequest pReq, final String pName, final float pDefault) {
        String str = pReq.getParameter(pName);

        try {
            return str != null ? Float.parseFloat(str) : pDefault;
        }
        catch (NumberFormatException nfe) {
            return pDefault;
        }
    }
public static float getFloatParameter ( final ServletRequest pReq , final String pName , final float pDefault ) { String str = pReq . getParameter ( pName ) ; try { return str != null ? Float . parseFloat ( str ) : pDefault ; } catch ( NumberFormatException nfe ) { return pDefault ; } }
Gets the value of the given parameter from the request converted to
a {@code float}.&nbsp;If the parameter is not set or not parseable, the default
value is returned.

@param pReq     the servlet request
@param pName    the parameter name
@param pDefault the default value
@return the value of the parameter converted to a {@code float}, or the default
value, if the parameter is not set.