code: public static PageContext getPageContext(JspContext jspContext) {
          if(!(jspContext instanceof PageContext))
              throw new IllegalStateException(Bundle.getErrorString("DataGridUtil_IllegalJspContext", new Object[]{(jspContext != null ? jspContext.getClass().getName() : "null")}));
          else
              return (PageContext)jspContext;
      }
docs: Attempt to convert a {@link JspContext} into a {@link PageContext}.
  @param jspContext the jsp context
  @return the page context
  @throws IllegalStateException if the {@link JspContext} can't be converted into a {@link PageContext}