code: public static ServletRequest convertRequest(Object input) {
  
          ServletRequest req = null;
          if (input instanceof ServletRequest) {
              req = (ServletRequest)input;
          } else if (input instanceof PageContext) {
              req = ((PageContext)input).getRequest();
          }
          return req;
      }
docs: Tries to convert the given input object into a request.<p>
  
  This is only possible if the input object is already a request
  or if it is a page context.<p>
  
  If everything else, this method returns <code>null</code>.<p>
  
  @param input the input object to convert to a request
  
  @return a request object, or <code>null</code>