public static int getRequestStep(final Request request) {
		String val = request.getParameter(Environment.STEP_VARIABLE);

		if (val == null) {
			return 0;
		}
		try {
			return Integer.parseInt(val);
		} catch (NumberFormatException ex) {
			return -1;
		}
	}
public static int getRequestStep ( final Request request ) { String val = request . getParameter ( Environment . STEP_VARIABLE ) ; if ( val == null ) { return 0 ; } try { return Integer . parseInt ( val ) ; } catch ( NumberFormatException ex ) { return - 1 ; } }
Retrieves the value of the step variable from the given request.

@param request the request being responded to.
@return the request step present in the request, or -1 on error.