private Long id(HttpServletRequest request){
  Long id=null;
  String pathInfo=request.getPathInfo();
  if (pathInfo != null && pathInfo.length() > 1) {
    String idString=pathInfo.substring(1);
    id=Long.valueOf(idString);
  }
  return id;
}

private Long id ( HttpServletRequest request ) { Long id = null ; String pathInfo = request . getPathInfo ( ) ; if ( pathInfo != null && pathInfo . length ( ) > 1 ) { String idString = pathInfo . substring ( 1 ) ; id = Long . valueOf ( idString ) ; } return id ; }
extract id from the http request .
