protected String getMethod ( HttpServletRequest request ) { String uri = request . getRequestURI ( ) ; String q = uri . substring ( ( request . getContextPath ( ) + request . getServletPath ( ) ) . length ( ) + 1 ) ; int i = q . indexOf ( "." ) ; String method = null ; if ( i > 0 ) { method = q . substring ( i + 1 ) ; } return method ; }
Get method from request .