code: public String getApplicationUriWithQuery() {
          StringBuilder sb = new StringBuilder();
          sb.append(getApplicationUri());
          if (getQuery() != null) {
              sb.append('?').append(getQuery());
          }
  
          return sb.toString();
      }
docs: Returns the uri with the query string relative to the application root path.
  
  @return the application-relative uri with the query