public static boolean isRelayStateURLValid(HttpServletRequest request,String relayState,String role){
  String metaAlias=SAML2MetaUtils.getMetaAliasByUri(request.getRequestURI());
  if (metaAlias == null) {
    metaAlias=request.getParameter(SAML2MetaManager.NAME_META_ALIAS_IN_URI);
  }
  return isRelayStateURLValid(metaAlias,relayState,role);
}

public static boolean isRelayStateURLValid ( HttpServletRequest request , String relayState , String role ) { String metaAlias = SAML2MetaUtils . getMetaAliasByUri ( request . getRequestURI ( ) ) ; if ( metaAlias == null ) { metaAlias = request . getParameter ( SAML2MetaManager . NAME_META_ALIAS_IN_URI ) ; } return isRelayStateURLValid ( metaAlias , relayState , role ) ; }
convenience method to validate a saml2 relay state ( goto ) url , often called from a jsp .
