code: public static String getId(){
          String paramId = RequestContext.getHttpRequest().getParameter("id");
          if(paramId != null && RequestContext.getHttpRequest().getAttribute("id") != null){
              LOGGER.warn("WARNING: probably you have 'id' supplied both as a HTTP parameter, as well as in the URI. Choosing parameter over URI value.");
          }
  
          String theId;
          if(paramId != null){
              theId =  paramId;
          }else{
              Object id = RequestContext.getHttpRequest().getAttribute("id");
              theId =  id != null ? id.toString() : null;
          }
          return Util.blank(theId) ? null : theId;
      }
docs: Returns value of ID if one is present on a URL. Id is usually a part of a URI, such as: <code>/controller/action/id</code>.
  This depends on a type of a URI, and whether controller is RESTful or not.
  
  @return ID value from URI is one exists, null if not.