anchor.diff:          samlSsoServuceProviderConfigBean.clearBean();
   
           String message;
  -        if (status) {     	
  -			if (isEditingSP) {
  -				message = resourceBundle.getString("sp.updated.successfully");
  -			} else {
  -				message = resourceBundle.getString("sp.added.successfully");
  -			}
  -		} else {
  -			message = resourceBundle.getString("error.adding.sp");
  -		}
  -
  -		if (status) {
  -			CarbonUIMessage.sendCarbonUIMessage(message, CarbonUIMessage.INFO, request);
  -		} else {
  -			CarbonUIMessage.sendCarbonUIMessage(message, CarbonUIMessage.ERROR, request);
  -		}
  +        if (status) {
  +            if (isEditingSP) {
  +                message = resourceBundle.getString("sp.updated.successfully");
  +            } else {
  +                message = resourceBundle.getString("sp.added.successfully");
  +            }
  +        } else {
  +            message = resourceBundle.getString("error.adding.sp");
  +        }
  +
  +        if (status) {
  +            CarbonUIMessage.sendCarbonUIMessage(message, CarbonUIMessage.INFO, request);
  +        } else {
  +            CarbonUIMessage.sendCarbonUIMessage(message, CarbonUIMessage.ERROR, request);
  +        }
   %>
   <script>
  -<%
  -boolean applicationComponentFound = CarbonUIUtil.isContextRegistered(config, "/application/");
  -
  -if (applicationComponentFound) {
  -	if (status) {
  -%>
  +    <%
  +    boolean applicationComponentFound = CarbonUIUtil.isContextRegistered(config, "/application/");
  +
  +    if (applicationComponentFound) {
  +        if (status) {
  +    %>
       location.href = '../application/configure-service-provider.jsp?action=update&display=samlIssuer&spName=<%=spName%>&samlIssuer=<%=serviceProviderDTO.getIssuer()%>&attrConServIndex=<%=attributeConsumingServiceIndex%>';
  -<% } else { %>
  -	location.href = '../application/configure-service-provider.jsp?action=delete&display=samlIssuer&spName=<%=spName%>&samlIssuer=<%=serviceProviderDTO.getIssuer()%>&attrConServIndex=<%=attributeConsumingServiceIndex%>';
  -
  -<% } } else { %>
  +    <% } else { %>
  +    location.href = '../application/configure-service-provider.jsp?action=delete&display=samlIssuer&spName=<%=spName%>&samlIssuer=<%=serviceProviderDTO.getIssuer()%>&attrConServIndex=<%=attributeConsumingServiceIndex%>';
  +
  +    <% } } else { %>
       location.href = 'manage_service_providers.jsp?region=region1&item=manage_saml_sso';
  -<% } %>
  +    <% } %>
   </script>
   <%
   
  
positive.code:             }
          }
  
          if ("true".equals(request.getParameter(SAMLSSOUIConstants.ENABLE_RESPONSE_SIGNATURE))) {
              serviceProviderDTO.setDoSignResponse(true);
          }
  
          if ("true".equals(request.getParameter(SAMLSSOUIConstants.ENABLE_ASSERTION_SIGNATURE))) {
              serviceProviderDTO.setDoSignAssertions(true);
          }
          
          serviceProviderDTO.setNameIDFormat(request.getParameter(SAMLSSOUIConstants.NAME_ID_FORMAT));
          
          if (serviceProviderDTO.getNameIDFormat()!=null) {
          	serviceProviderDTO.setNameIDFormat(serviceProviderDTO.getNameIDFormat().replace(":", "/"));
          }
  
          if (request.getParameter(SAMLSSOUIConstants.ENABLE_ATTRIBUTE_PROFILE) != null) {
              serviceProviderDTO.setRequestedClaims(samlSsoServuceProviderConfigBean.getSelectedClaimsAttay());
              serviceProviderDTO.setEnableAttributeProfile(true);
  
              if ("true".equals(request.getParameter(SAMLSSOUIConstants.ENABLE_DEFAULT_ATTRIBUTE_PROFILE_HIDDEN))) {
                  serviceProviderDTO.setEnableAttributesByDefault(true);
              }
          }
          
          if ("true".equals(request.getParameter(SAMLSSOUIConstants.ENABLE_NAME_ID_CLAIM_URI_HIDDEN))) {
                  serviceProviderDTO.setNameIdClaimUri(request.getParameter(SAMLSSOUIConstants.NAME_ID_CLAIM));
          }
                 
                 
          if ("true".equals(request.getParameter(SAMLSSOUIConstants.ENABLE_AUDIENCE_RESTRICTION))) {
              serviceProviderDTO.setRequestedAudiences(samlSsoServuceProviderConfigBean.getSelectedAudiencesArray());
          }
  
          if ("true".equals(request.getParameter(SAMLSSOUIConstants.ENABLE_RECIPIENTS))) {
              serviceProviderDTO.setRequestedRecipients(samlSsoServuceProviderConfigBean.getSelectedRecipientsArray());
          }
  
          if (request.getParameter(SAMLSSOUIConstants.LOGIN_PAGE_URL)!=null && !"null".equals(request.getParameter(SAMLSSOUIConstants.LOGIN_PAGE_URL))) {
              serviceProviderDTO.setLoginPageURL(request.getParameter(SAMLSSOUIConstants.LOGIN_PAGE_URL));
          }
  
          if ("true".equals(request.getParameter(SAMLSSOUIConstants.ENABLE_ATTRIBUTE_PROFILE))) {
  
          String claimsCountParameter = SAMLSSOUIUtil.getSafeInput(request, "claimPropertyCounter");
          if (claimsCountParameter != null && !"".equals(claimsCountParameter)) {
              try {
                  int claimsCount = Integer.parseInt(claimsCountParameter);
                  for (int i = 0; i < claimsCount; i++) {
                      String claim = SAMLSSOUIUtil.getSafeInput(request, "claimPropertyName" + i);
                      if (claim != null && !"".equals(claim) && !"null".equals(claim)) {
                          String[] currentClaims = serviceProviderDTO.getRequestedClaims();
                          boolean isClaimAlreadyAdded = false;
                          for (String currentClaim : currentClaims) {
                              if (claim.equals(currentClaim)) {
                                  isClaimAlreadyAdded = true;
                                  break;
                              }
                          }
  
                          if (!isClaimAlreadyAdded) {
                              serviceProviderDTO.addRequestedClaims(claim);
                          }
                      }
                  }
              } catch (NumberFormatException e) {
                  throw new RuntimeException("Invalid number", e);
              }
          }
          }
  
          if ("true".equals(request.getParameter(SAMLSSOUIConstants.ENABLE_AUDIENCE_RESTRICTION))) {
  
          	String audiencesCountParameter = SAMLSSOUIUtil.getSafeInput(request, "audiencePropertyCounter");
          	if (audiencesCountParameter != null && !"".equals(audiencesCountParameter)) {
              	try {
                  	int audiencesCount = Integer.parseInt(audiencesCountParameter);
                  	for (int i = 0; i < audiencesCount; i++) {
                      	String audience = SAMLSSOUIUtil.getSafeInput(request, "audiencePropertyName" + i);
                      	if (audience != null && !"".equals(audience) && !"null".equals(audience)) {
                          	String[] currentAudiences = serviceProviderDTO.getRequestedAudiences();
                          	boolean isAudienceAlreadyAdded = false;
                          	for (String currentAudience : currentAudiences) {
                              	if (audience.equals(currentAudience)) {
                                 		isAudienceAlreadyAdded = true;
                                  	break;
                              	}
                          	}
  
                          	if (!isAudienceAlreadyAdded) {
                              	serviceProviderDTO.addRequestedAudiences(audience);
                          	}
                      	}
                  	}
              	} catch (NumberFormatException e) {
                  	throw new RuntimeException("Invalid number", e);
              	}
          	}
          }
  
          if ("true".equals(request.getParameter(SAMLSSOUIConstants.ENABLE_RECIPIENTS))) {
  
              String recipientCountParameter = SAMLSSOUIUtil.getSafeInput(request, "recipientPropertyCounter");
              if (recipientCountParameter != null && !"".equals(recipientCountParameter)) {
  
negative.code: 
  
  <%
      String backendServerURL;
      ConfigurationContext configContext;
      String cookie;
      String user = null;
  