Example usage for javax.servlet.jsp PageContext getSession

List of usage examples for javax.servlet.jsp PageContext getSession

Introduction

In this page you can find the example usage for javax.servlet.jsp PageContext getSession.

Prototype


abstract public HttpSession getSession();

Source Link

Document

The current value of the session object (an HttpSession).

Usage

From source file:com.adito.input.tags.VariablesTag.java

/**
 * Method to generate the Replacement Variable Chooser Fragment.
 * /* w w w  .  j av  a2 s .  c  o  m*/
 * @param titleKey
 * @param pageContext
 * @param bundle
 * @param locale
 * @param inputId
 * @param variables
 * @param includeSession
 * @param includeUserAttributes
 * @param includeRequest
 * @return String
 * @throws JspException
 */
public static String generateReplacementVariableChooserFragment(String titleKey, PageContext pageContext,
        String bundle, String locale, String inputId, String variables, boolean includeSession,
        boolean includeUserAttributes, boolean includeRequest) throws JspException {
    StringBuffer buf = new StringBuffer();

    String title = null;
    if (titleKey != null) {
        title = TagUtils.getInstance().message(pageContext, bundle, locale, titleKey, new String[] {});
    }
    if (title == null) {
        title = TagUtils.getInstance().message(pageContext, bundle, locale, "replacementVariablesChooser.title",
                new String[] {});
        if (title == null) {
            title = "Replacement Variables";
        }
    }
    buf.append("<div class=\"component_replacementVariablesToggle\">");

    // buf.append("<input type=\"button\"
    // onclick=\"toggleAndPositionBelow(document.getElementById('replacementVariablesChooser");
    // buf.append(inputId);
    // buf.append("'), document.getElementById('");
    // buf.append(inputId);
    // buf.append("'))\" ");
    // buf.append("value=\"${}\"/>");

    buf.append("<img onclick=\"togglePopupBelowLeft(document.getElementById('replacementVariablesChooser");
    buf.append(inputId);
    buf.append("'), document.getElementById('");
    buf.append(inputId);
    buf.append("'))\" ");
    buf.append("src=\"");
    buf.append(CoreUtil.getThemePath(pageContext.getSession()));
    buf.append("/images/variables.gif\"/>");

    buf.append("</div>");
    buf.append("<div id=\"replacementVariablesChooser");
    buf.append(inputId);
    buf.append("\" style=\"position:absolute;display: none;overflow:visible;top:4px;left:4px;z-index:900;\">");
    buf.append("<div class=\"replacementVariablesMain\">");
    buf.append("<div class=\"replacementVariablesTitleBar\">");
    buf.append("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">");
    buf.append("<tr><td class=\"title\">");
    buf.append(title);
    buf.append("</td><td class=\"close\"><img src=\"");
    buf.append(CoreUtil.getThemePath(pageContext.getSession()));
    buf.append("/images/actions/erase.gif\" ");
    buf.append("onclick=\"document.getElementById('");
    buf.append(inputId);
    buf.append("').value = ''\"/><img src=\"");
    buf.append(CoreUtil.getThemePath(pageContext.getSession()));
    buf.append("/images/actions/closeReplacementVariables.gif\" ");
    buf.append("onclick=\"togglePopup(document.getElementById('replacementVariablesChooser");
    buf.append(inputId);
    buf.append("'))\"/>");
    buf.append("</td></tr></table></div><div class=\"replacementVariablesContent\">");
    buf.append("<ul>");
    if (variables != null) {
        StringTokenizer t = new StringTokenizer(variables, ",");
        while (t.hasMoreTokens()) {
            String n = t.nextToken();
            addVariable(n, n, buf, pageContext, bundle, locale, inputId);
        }
    }
    if (includeSession) {
        addVariable("session:username", null, buf, pageContext, bundle, locale, inputId);
        addVariable("session:password", null, buf, pageContext, bundle, locale, inputId);
        addVariable("session:email", null, buf, pageContext, bundle, locale, inputId);
        addVariable("session:fullname", null, buf, pageContext, bundle, locale, inputId);
        addVariable("session:clientProxyURL", null, buf, pageContext, bundle, locale, inputId);
        addVariable("session:clientReverseProxyURL", null, buf, pageContext, bundle, locale, inputId);
    }

    if (includeRequest) {
        addVariable("request:serverName", null, buf, pageContext, bundle, locale, inputId);
        addVariable("request:serverPort", null, buf, pageContext, bundle, locale, inputId);
        addVariable("request:userAgent", null, buf, pageContext, bundle, locale, inputId);
    }

    if (includeUserAttributes) {
        Collection<PropertyDefinition> l;
        try {
            for (PropertyClass propertyClass : PropertyClassManager.getInstance().getPropertyClasses()) {
                if (propertyClass instanceof AttributesPropertyClass
                        && !propertyClass.getName().equals(ResourceAttributes.NAME)) {
                    l = propertyClass.getDefinitions();
                    for (PropertyDefinition d : l) {
                        AttributeDefinition def = (AttributeDefinition) d;
                        if (def.isReplaceable()) {
                            addVariable(def.getPropertyClass().getName() + ":" + def.getName(),
                                    def.getDescription(), buf, pageContext, bundle, locale, inputId);
                        }
                    }
                }
            }
        } catch (Exception e) {
            log.error("Failed to get user attribute definitions.");
        }
    }
    buf.append("</ul>");
    buf.append("</div>");
    buf.append("</div>");
    return buf.toString();
}

From source file:com.truthbean.core.web.kindeditor.FileUpload.java

@Override
public void service(final HttpServletRequest request, final HttpServletResponse response)
        throws IOException, ServletException {

    final PageContext pageContext;
    HttpSession session = null;//from  ww  w  .  j  av  a2  s. co m
    final ServletContext application;
    final ServletConfig config;
    JspWriter out = null;
    final Object page = this;
    JspWriter _jspx_out = null;
    PageContext _jspx_page_context = null;

    try {
        response.setContentType("text/html; charset=UTF-8");
        pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");
        out.write("\r\n");

        /**
         * KindEditor JSP
         *
         * JSP???? ??
         *
         */
        // ?
        String savePath = pageContext.getServletContext().getRealPath("/") + "resource/";

        String savePath$ = savePath;

        // ?URL
        String saveUrl = request.getContextPath() + "/resource/";

        // ???
        HashMap<String, String> extMap = new HashMap<>();
        extMap.put("image", "gif,jpg,jpeg,png,bmp");
        extMap.put("flash", "swf,flv");
        extMap.put("media", "swf,flv,mp3,wav,wma,wmv,mid,avi,mpg,asf,rm,rmvb");
        extMap.put("file", "doc,docx,xls,xlsx,ppt,htm,html,txt,zip,rar,gz,bz2");

        // ?
        long maxSize = 10 * 1024 * 1024 * 1024L;

        response.setContentType("text/html; charset=UTF-8");

        if (!ServletFileUpload.isMultipartContent(request)) {
            out.println(getError(""));
            return;
        }
        // 
        File uploadDir = new File(savePath);
        if (!uploadDir.isDirectory()) {
            out.println(getError("?"));
            return;
        }
        // ??
        if (!uploadDir.canWrite()) {
            out.println(getError("??"));
            return;
        }

        String dirName = request.getParameter("dir");
        if (dirName == null) {
            dirName = "image";
        }
        if (!extMap.containsKey(dirName)) {
            out.println(getError("???"));
            return;
        }
        // 
        savePath += dirName + "/";
        saveUrl += dirName + "/";
        File saveDirFile = new File(savePath);
        if (!saveDirFile.exists()) {
            saveDirFile.mkdirs();
        }
        SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd");
        String ymd = sdf.format(new Date());
        savePath += ymd + "/";
        saveUrl += ymd + "/";
        File dirFile = new File(savePath);
        if (!dirFile.exists()) {
            dirFile.mkdirs();
        }

        FileItemFactory factory = new DiskFileItemFactory();
        ServletFileUpload upload = new ServletFileUpload(factory);
        upload.setHeaderEncoding("UTF-8");
        List items = upload.parseRequest(request);
        Iterator itr = items.iterator();
        while (itr.hasNext()) {
            FileItem item = (FileItem) itr.next();
            String fileName = item.getName();
            if (!item.isFormField()) {
                // ?
                if (item.getSize() > maxSize) {
                    out.println(getError("??"));
                    return;
                }
                // ??
                String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase();
                if (!Arrays.asList(extMap.get(dirName).split(",")).contains(fileExt)) {
                    out.println(getError("??????\n??"
                            + extMap.get(dirName) + "?"));
                    return;
                }

                SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmmss");
                String newFileName = df.format(new Date()) + "_" + new Random().nextInt(1000) + "." + fileExt;
                try {
                    File uploadedFile = new File(savePath, newFileName);
                    item.write(uploadedFile);
                } catch (Exception e) {
                    out.println(getError(""));
                    return;
                }

                JSONObject obj = new JSONObject();
                obj.put("error", 0);
                obj.put("url", saveUrl + newFileName);

                request.getSession().setAttribute("fileName", savePath$ + fileName);
                request.getSession().setAttribute("filePath", savePath + newFileName);
                request.getSession().setAttribute("fileUrl", saveUrl + newFileName);

                out.println(obj.toJSONString());
            }
        }

        out.write('\r');
        out.write('\n');
    } catch (IOException | FileUploadException t) {
        if (!(t instanceof javax.servlet.jsp.SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0) {
                if (response.isCommitted()) {
                    out.flush();
                } else {
                    out.clearBuffer();
                }
            }
            if (_jspx_page_context != null) {
                _jspx_page_context.handlePageException(t);
            } else {
                throw new ServletException(t);
            }
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:com.ecyrd.jspwiki.preferences.Preferences.java

/**
 *  Reloads the preferences from the PageContext into the WikiContext.
 *  /*from  w  ww  .ja  v a  2 s .c om*/
 *  @param pageContext The page context.
 */
// FIXME: The way that date preferences are chosen is currently a bit wacky: it all
//        gets saved to the cookie based on the browser state with which the user
//        happened to first arrive to the site with.  This, unfortunately, means that
//        even if the user changes e.g. language preferences (like in a web cafe),
//        the old preferences still remain in a site cookie.
public static void reloadPreferences(PageContext pageContext) {
    Preferences prefs = new Preferences();
    Properties props = PropertyReader.loadWebAppProps(pageContext.getServletContext());
    WikiContext ctx = WikiContext.findContext(pageContext);

    prefs.put("SkinName",
            TextUtil.getStringProperty(props, "jspwiki.defaultprefs.template.skinname", "PlainVanilla"));
    prefs.put("DateFormat",
            TextUtil.getStringProperty(props, "jspwiki.defaultprefs.template.dateformat",
                    ctx.getEngine().getInternationalizationManager().get(
                            InternationalizationManager.CORE_BUNDLE, getLocale(ctx), "common.datetimeformat")));

    prefs.put("TimeZone", TextUtil.getStringProperty(props, "jspwiki.defaultprefs.template.timezone",
            java.util.TimeZone.getDefault().getID()));

    prefs.put("Orientation",
            TextUtil.getStringProperty(props, "jspwiki.defaultprefs.template.orientation", "fav-left"));

    prefs.put("Language", TextUtil.getStringProperty(props, "jspwiki.defaultprefs.template.language",
            getLocale(ctx).toString()));

    prefs.put("SectionEditing",
            TextUtil.getStringProperty(props, "jspwiki.defaultprefs.template.sectionediting", ""));

    // FIXME: "editor" property does not get registered, may be related with http://bugs.jspwiki.org/show_bug.cgi?id=117
    // disabling it until knowing why it's happening
    // FIXME: editormanager reads jspwiki.editor -- which of both properties should continue
    prefs.put("editor", TextUtil.getStringProperty(props, "jspwiki.defaultprefs.template.editor", "plain"));

    parseJSONPreferences((HttpServletRequest) pageContext.getRequest(), prefs);

    pageContext.getSession().setAttribute(SESSIONPREFS, prefs);
}

From source file:org.apache.jsp.WEB_002dINF.pages.includes.topmenu_jsp.java

public void _jspService(final javax.servlet.http.HttpServletRequest request,
        final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;

    try {// ww w. j a v a2 s. c o m
        response.setContentType("text/html");
        pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        if (_jspx_meth_c_005fif_005f0(_jspx_page_context))
            return;
    } catch (java.lang.Throwable t) {
        if (!(t instanceof javax.servlet.jsp.SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
            else
                throw new ServletException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.agnitas.util.AgnUtils.java

public static Admin getAdmin(PageContext pageContext) {
    try {//from  w  w w  .  ja v a  2 s .c o m
        HttpSession session = pageContext.getSession();
        if (session == null) {
            logger.error("no pageContext data found for getAdmin");
            return null;
        } else {
            Admin admin = (Admin) session.getAttribute("emm.admin");
            if (admin == null) {
                logger.error("no admin found in pageContext data");
                return null;
            } else {
                return admin;
            }
        }
    } catch (Exception e) {
        logger.error("no admin found for pageContext", e);
        return null;
    }
}

From source file:org.apache.jsp.application.configure_002dservice_002dprovider_jsp.java

public void _jspService(final javax.servlet.http.HttpServletRequest request,
        final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;

    try {/*w  w w.j  a v  a 2  s  .  c  om*/
        response.setContentType("text/html");
        pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        out.write("<!--\n");
        out.write("~ Copyright (c) 2005-2013, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n");
        out.write("~\n");
        out.write("~ WSO2 Inc. licenses this file to you under the Apache License,\n");
        out.write("~ Version 2.0 (the \"License\"); you may not use this file except\n");
        out.write("~ in compliance with the License.\n");
        out.write("~ You may obtain a copy of the License at\n");
        out.write("~\n");
        out.write("~    http://www.apache.org/licenses/LICENSE-2.0\n");
        out.write("~\n");
        out.write("~ Unless required by applicable law or agreed to in writing,\n");
        out.write("~ software distributed under the License is distributed on an\n");
        out.write("~ \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n");
        out.write("~ KIND, either express or implied.  See the License for the\n");
        out.write("~ specific language governing permissions and limitations\n");
        out.write("~ under the License.\n");
        out.write("-->\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("<link href=\"css/idpmgt.css\" rel=\"stylesheet\" type=\"text/css\" media=\"all\"/>\n");
        //  carbon:breadcrumb
        org.wso2.carbon.ui.taglibs.Breadcrumb _jspx_th_carbon_005fbreadcrumb_005f0 = (org.wso2.carbon.ui.taglibs.Breadcrumb) _005fjspx_005ftagPool_005fcarbon_005fbreadcrumb_0026_005ftopPage_005fresourceBundle_005frequest_005flabel_005fnobody
                .get(org.wso2.carbon.ui.taglibs.Breadcrumb.class);
        _jspx_th_carbon_005fbreadcrumb_005f0.setPageContext(_jspx_page_context);
        _jspx_th_carbon_005fbreadcrumb_005f0.setParent(null);
        // /application/configure-service-provider.jsp(44,0) name = label type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_carbon_005fbreadcrumb_005f0.setLabel("breadcrumb.service.provider");
        // /application/configure-service-provider.jsp(44,0) name = resourceBundle type = null reqTime = true required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_carbon_005fbreadcrumb_005f0
                .setResourceBundle("org.wso2.carbon.identity.application.mgt.ui.i18n.Resources");
        // /application/configure-service-provider.jsp(44,0) name = topPage type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_carbon_005fbreadcrumb_005f0.setTopPage(true);
        // /application/configure-service-provider.jsp(44,0) name = request type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_carbon_005fbreadcrumb_005f0.setRequest(request);
        int _jspx_eval_carbon_005fbreadcrumb_005f0 = _jspx_th_carbon_005fbreadcrumb_005f0.doStartTag();
        if (_jspx_th_carbon_005fbreadcrumb_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fcarbon_005fbreadcrumb_0026_005ftopPage_005fresourceBundle_005frequest_005flabel_005fnobody
                    .reuse(_jspx_th_carbon_005fbreadcrumb_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fcarbon_005fbreadcrumb_0026_005ftopPage_005fresourceBundle_005frequest_005flabel_005fnobody
                .reuse(_jspx_th_carbon_005fbreadcrumb_005f0);
        out.write('\n');
        org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response, "../dialog/display_messages.jsp",
                out, false);
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("<script type=\"text/javascript\" src=\"../admin/js/main.js\"></script>\n");
        out.write(
                "<script type=\"text/javascript\" src=\"../identity/validation/js/identity-validate.js\"></script>\n");
        out.write("\n");
        out.write("\n");

        ApplicationBean appBean = ApplicationMgtUIUtil.getApplicationBeanFromSession(session,
                request.getParameter("spName"));
        if (appBean.getServiceProvider() == null || appBean.getServiceProvider().getApplicationName() == null) {
            // if appbean is not set properly redirect the user to list-service-provider.jsp.

            out.write("\n");
            out.write("<script>\n");
            out.write("location.href = \"list-service-providers.jsp\";\n");
            out.write("</script>\n");

            return;
        }
        String spName = appBean.getServiceProvider().getApplicationName();

        List<String> permissions = null;
        permissions = appBean.getPermissions();

        String[] allClaimUris = appBean.getClaimUris();
        Map<String, String> claimMapping = appBean.getClaimMapping();
        Map<String, String> roleMapping = appBean.getRoleMapping();
        boolean isLocalClaimsSelected = appBean.isLocalClaimsSelected();
        String idPName = request.getParameter("idPName");
        String action = request.getParameter("action");
        String[] userStoreDomains = null;
        boolean isNeedToUpdate = false;

        String authTypeReq = request.getParameter("authType");
        if (authTypeReq != null && authTypeReq.trim().length() > 0) {
            appBean.setAuthenticationType(authTypeReq);
        }

        String samlIssuerName = request.getParameter("samlIssuer");

        if (samlIssuerName != null && "update".equals(action)) {
            appBean.setSAMLIssuer(samlIssuerName);
            isNeedToUpdate = true;
        }

        if (samlIssuerName != null && "delete".equals(action)) {
            appBean.deleteSAMLIssuer();
            isNeedToUpdate = true;
        }

        samlIssuerName = appBean.getSAMLIssuer();

        String kerberosServicePrinciple = request.getParameter("kerberos");

        if (kerberosServicePrinciple != null && "update".equals(action)) {
            appBean.setKerberosServiceName(kerberosServicePrinciple);
            isNeedToUpdate = true;
        }

        if (kerberosServicePrinciple != null && "delete".equals(action)) {
            appBean.deleteKerberosApp();
            isNeedToUpdate = true;
        }

        String attributeConsumingServiceIndex = request.getParameter("attrConServIndex");
        if (attributeConsumingServiceIndex != null) {
            appBean.setAttributeConsumingServiceIndex(attributeConsumingServiceIndex);
        }

        String oauthapp = request.getParameter("oauthapp");

        if (oauthapp != null && "update".equals(action)) {
            appBean.setOIDCAppName(oauthapp);
            isNeedToUpdate = true;
        }

        if (oauthapp != null && "delete".equals(action)) {
            appBean.deleteOauthApp();
            isNeedToUpdate = true;
        }

        String oauthConsumerSecret = null;

        if (session.getAttribute("oauth-consum-secret") != null && "update".equals(action)) {
            oauthConsumerSecret = (String) session.getAttribute("oauth-consum-secret");
            appBean.setOauthConsumerSecret(oauthConsumerSecret);
            session.removeAttribute("oauth-consum-secret");
        }

        oauthapp = appBean.getOIDCClientId();

        String wsTrust = request.getParameter("serviceName");

        if (wsTrust != null && "update".equals(action)) {
            appBean.setWstrustEp(wsTrust);
            isNeedToUpdate = true;
        }

        if (wsTrust != null && "delete".equals(action)) {
            appBean.deleteWstrustEp();
            isNeedToUpdate = true;
        }

        wsTrust = appBean.getWstrustSP();

        String display = request.getParameter("display");

        if (idPName != null && idPName.equals("")) {
            idPName = null;
        }

        if (ApplicationBean.AUTH_TYPE_FLOW.equals(authTypeReq) && "update".equals(action)) {
            isNeedToUpdate = true;
        }

        String authType = appBean.getAuthenticationType();

        StringBuffer localAuthTypes = new StringBuffer();
        String startOption = "<option value=\"";
        String middleOption = "\">";
        String endOPtion = "</option>";

        StringBuffer requestPathAuthTypes = new StringBuffer();
        RequestPathAuthenticatorConfig[] requestPathAuthenticators = appBean.getRequestPathAuthenticators();

        if (requestPathAuthenticators != null && requestPathAuthenticators.length > 0) {
            for (RequestPathAuthenticatorConfig reqAuth : requestPathAuthenticators) {
                requestPathAuthTypes.append(startOption + Encode.forHtmlAttribute(reqAuth.getName())
                        + middleOption + Encode.forHtmlContent(reqAuth.getDisplayName()) + endOPtion);
            }
        }

        Map<String, String> idpAuthenticators = new HashMap<String, String>();
        IdentityProvider[] federatedIdPs = appBean.getFederatedIdentityProviders();
        Map<String, String> proIdpConnector = new HashMap<String, String>();
        Map<String, String> enabledProIdpConnector = new HashMap<String, String>();
        Map<String, String> selectedProIdpConnectors = new HashMap<String, String>();
        Map<String, Boolean> idpStatus = new HashMap<String, Boolean>();
        Map<String, Boolean> IdpProConnectorsStatus = new HashMap<String, Boolean>();

        StringBuffer idpType = null;
        StringBuffer connType = null;
        StringBuffer enabledConnType = null;

        if (federatedIdPs != null && federatedIdPs.length > 0) {
            idpType = new StringBuffer();
            StringBuffer provisioningConnectors = null;
            for (IdentityProvider idp : federatedIdPs) {
                idpStatus.put(idp.getIdentityProviderName(), idp.getEnable());
                if (idp.getProvisioningConnectorConfigs() != null
                        && idp.getProvisioningConnectorConfigs().length > 0) {
                    ProvisioningConnectorConfig[] connectors = idp.getProvisioningConnectorConfigs();
                    int i = 1;
                    connType = new StringBuffer();
                    enabledConnType = new StringBuffer();
                    provisioningConnectors = new StringBuffer();
                    for (ProvisioningConnectorConfig proConnector : connectors) {
                        if (i == connectors.length) {
                            provisioningConnectors
                                    .append(proConnector.getEnabled() ? proConnector.getName() : "");
                        } else {
                            provisioningConnectors
                                    .append(proConnector.getEnabled() ? proConnector.getName() + "," : "");
                        }
                        connType.append(startOption + Encode.forHtmlAttribute(proConnector.getName())
                                + middleOption + Encode.forHtmlContent(proConnector.getName()) + endOPtion);
                        if (proConnector.getEnabled()) {
                            enabledConnType.append(startOption + Encode.forHtmlAttribute(proConnector.getName())
                                    + middleOption + Encode.forHtmlContent(proConnector.getName()) + endOPtion);
                        }
                        IdpProConnectorsStatus.put(idp.getIdentityProviderName() + "_" + proConnector.getName(),
                                proConnector.getEnabled());
                        i++;
                    }
                    proIdpConnector.put(idp.getIdentityProviderName(), connType.toString());
                    if (idp.getEnable()) {
                        enabledProIdpConnector.put(idp.getIdentityProviderName(), enabledConnType.toString());
                        idpType.append(startOption + Encode.forHtmlAttribute(idp.getIdentityProviderName())
                                + "\" data=\"" + Encode.forHtmlAttribute(provisioningConnectors.toString())
                                + "\" >" + Encode.forHtmlContent(idp.getIdentityProviderName()) + endOPtion);
                    }
                }
            }

            if (appBean.getServiceProvider().getOutboundProvisioningConfig() != null
                    && appBean.getServiceProvider().getOutboundProvisioningConfig()
                            .getProvisioningIdentityProviders() != null
                    && appBean.getServiceProvider().getOutboundProvisioningConfig()
                            .getProvisioningIdentityProviders().length > 0) {

                IdentityProvider[] proIdps = appBean.getServiceProvider().getOutboundProvisioningConfig()
                        .getProvisioningIdentityProviders();
                for (IdentityProvider idp : proIdps) {
                    ProvisioningConnectorConfig proIdp = idp.getDefaultProvisioningConnectorConfig();
                    String options = proIdpConnector.get(idp.getIdentityProviderName());
                    if (proIdp != null && options != null) {
                        String oldOption = startOption + Encode.forHtmlAttribute(proIdp.getName())
                                + middleOption + Encode.forHtmlContent(proIdp.getName()) + endOPtion;
                        String newOption = startOption + Encode.forHtmlAttribute(proIdp.getName())
                                + "\" selected=\"selected" + middleOption
                                + Encode.forHtmlContent(proIdp.getName()) + endOPtion;
                        if (options.contains(oldOption)) {
                            options = options.replace(oldOption, newOption);
                        } else {
                            options = options + newOption;
                        }
                        selectedProIdpConnectors.put(idp.getIdentityProviderName(), options);
                    } else {
                        options = enabledProIdpConnector.get(idp.getIdentityProviderName());
                        selectedProIdpConnectors.put(idp.getIdentityProviderName(), options);
                    }

                }
            }

        }
        try {
            String cookie = (String) session.getAttribute(ServerConstants.ADMIN_SERVICE_COOKIE);
            String backendServerURL = CarbonUIUtil.getServerURL(config.getServletContext(), session);
            ConfigurationContext configContext = (ConfigurationContext) config.getServletContext()
                    .getAttribute(CarbonConstants.CONFIGURATION_CONTEXT);
            ApplicationManagementServiceClient serviceClient = new ApplicationManagementServiceClient(cookie,
                    backendServerURL, configContext);
            userStoreDomains = serviceClient.getUserStoreDomains();
        } catch (Exception e) {
            CarbonUIMessage.sendCarbonUIMessage("Error occured while loading User Store Domail",
                    CarbonUIMessage.ERROR, request, e);
        }

        out.write("\n");
        out.write("\n");
        out.write("<script>\n");
        out.write("\n");
        out.write("\n");
        if (claimMapping != null) {
            out.write("\n");
            out.write("var claimMappinRowID = ");
            out.print(claimMapping.size() - 1);
            out.write(';');
            out.write('\n');
        } else {
            out.write("\n");
            out.write("var claimMappinRowID = -1;\n");
        }
        out.write("\n");
        out.write("\n");
        out.write("var reqPathAuth = 0;\n");
        out.write("\n");
        if (appBean.getServiceProvider().getRequestPathAuthenticatorConfigs() != null) {
            out.write("\n");
            out.write("var reqPathAuth = ");
            out.print(appBean.getServiceProvider().getRequestPathAuthenticatorConfigs().length);
            out.write(';');
            out.write('\n');
        } else {
            out.write("\n");
            out.write("var reqPathAuth = 0;\n");
        }
        out.write('\n');
        out.write('\n');
        if (roleMapping != null) {
            out.write("\n");
            out.write("var roleMappinRowID = ");
            out.print(roleMapping.size() - 1);
            out.write(';');
            out.write('\n');
        } else {
            out.write("\n");
            out.write("var roleMappinRowID = -1;\n");
        }
        out.write("\n");
        out.write("\n");
        out.write("\tfunction createAppOnclick() {\n");
        out.write("\t\tvar spName = document.getElementById(\"spName\").value;\n");
        out.write("\t\tif( spName == '') {\n");
        out.write("\t\t\tCARBON.showWarningDialog('");
        if (_jspx_meth_fmt_005fmessage_005f0(_jspx_page_context))
            return;
        out.write("');\n");
        out.write("\t\t\tlocation.href = '#';\n");
        out.write("\t\t} else if (!validateTextForIllegal(document.getElementById(\"spName\"))) {\n");
        out.write("                        return false;\n");
        out.write("                } else {\n");
        out.write("\t\t\tif($('input:radio[name=claim_dialect]:checked').val() == \"custom\")\n");
        out.write("\t\t\t{\n");
        out.write("\t\t\t\tvar isValied = true;\n");
        out.write("\t\t\t\t$.each($('.spClaimVal'), function(){\n");
        out.write("\t\t\t\t\tif($(this).val().length == 0){\n");
        out.write("\t\t\t\t\t\tisValied = false;\n");
        out.write("\t\t\t\t\t\tCARBON.showWarningDialog('Please complete Claim Configuration section');\n");
        out.write("\t\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t\t}\t\t\n");
        out.write("\t\t\t\t});\n");
        out.write("\t\t\t\tif(!isValied){\n");
        out.write("\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t}\n");
        out.write("\t\t\t}\n");
        out.write("\t\t\t// number_of_claimmappings\n");
        out.write(
                "\t\t\tvar numberOfClaimMappings = document.getElementById(\"claimMappingAddTable\").rows.length;\n");
        out.write("\t\t\tdocument.getElementById('number_of_claimmappings').value=numberOfClaimMappings;\n");
        out.write("\t\t\t\n");
        out.write("\t\t\tif($('[name=app_permission]').length > 0){\n");
        out.write("\t\t\t\tvar isValied = true;\n");
        out.write("\t\t\t\t$.each($('[name=app_permission]'), function(){\n");
        out.write("\t\t\t\t\tif($(this).val().length == 0){\n");
        out.write("\t\t\t\t\t\tisValied = false;\n");
        out.write(
                "\t\t\t\t\t\tCARBON.showWarningDialog('Please complete Permission Configuration section');\n");
        out.write("\t\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t\t}\t\t\n");
        out.write("\t\t\t\t});\n");
        out.write("\t\t\t\tif(!isValied){\n");
        out.write("\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t}\n");
        out.write("\t\t\t}\n");
        out.write("\t\t\tif($('.roleMapIdp').length > 0){\n");
        out.write("\t\t\t\tvar isValied = true;\n");
        out.write("\t\t\t\t$.each($('.roleMapIdp'), function(){\n");
        out.write("\t\t\t\t\tif($(this).val().length == 0){\n");
        out.write("\t\t\t\t\t\tisValied = false;\n");
        out.write(
                "\t\t\t\t\t\tCARBON.showWarningDialog('Please complete Role Mapping Configuration section');\n");
        out.write("\t\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t\t}\t\t\n");
        out.write("\t\t\t\t});\n");
        out.write("\t\t\t\tif(isValied){\n");
        out.write("\t\t\t\t\tif($('.roleMapSp').length > 0){\n");
        out.write("\t\t\t\t\t\t$.each($('.roleMapSp'), function(){\n");
        out.write("\t\t\t\t\t\t\tif($(this).val().length == 0){\n");
        out.write("\t\t\t\t\t\t\t\tisValied = false;\n");
        out.write(
                "\t\t\t\t\t\t\t\tCARBON.showWarningDialog('Please complete Role Mapping Configuration section');\n");
        out.write("\t\t\t\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t\t\t\t}\t\t\n");
        out.write("\t\t\t\t\t\t});\n");
        out.write("\t\t\t\t\t}\n");
        out.write("\t\t\t\t}\n");
        out.write("\t\t\t\tif(!isValied){\n");
        out.write("\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t}\n");
        out.write("\t\t\t}\n");
        out.write(
                "\t\t\tvar numberOfPermissions = document.getElementById(\"permissionAddTable\").rows.length;\n");
        out.write("\t\t\tdocument.getElementById('number_of_permissions').value=numberOfPermissions;\n");
        out.write("\t\t\t\n");
        out.write(
                "\t\t\tvar numberOfRoleMappings = document.getElementById(\"roleMappingAddTable\").rows.length;\n");
        out.write("\t\t\tdocument.getElementById('number_of_rolemappings').value=numberOfRoleMappings;\n");
        out.write("\n");
        out.write("\t\t\tdocument.getElementById(\"configure-sp-form\").submit();\n");
        out.write("\t\t}\n");
        out.write("\t}\n");
        out.write("\t\n");
        out.write("\tfunction updateBeanAndRedirect(redirectURL){\n");
        out.write(
                "\t\tvar numberOfClaimMappings = document.getElementById(\"claimMappingAddTable\").rows.length;\n");
        out.write("\t\tdocument.getElementById('number_of_claimmappings').value=numberOfClaimMappings;\n");
        out.write("\t\t\n");
        out.write(
                "\t\tvar numberOfPermissions = document.getElementById(\"permissionAddTable\").rows.length;\n");
        out.write("\t\tdocument.getElementById('number_of_permissions').value=numberOfPermissions;\n");
        out.write("\t\t\n");
        out.write(
                "\t\tvar numberOfRoleMappings = document.getElementById(\"roleMappingAddTable\").rows.length;\n");
        out.write("\t\tdocument.getElementById('number_of_rolemappings').value=numberOfRoleMappings;\n");
        out.write("\t\t\n");
        out.write("\t\t$.ajax({\n");
        out.write("\t\t    type: \"POST\",\n");
        out.write("\t\t\turl: 'update-application-bean.jsp?spName=");
        out.print(Encode.forUriComponent(spName));
        out.write("',\n");
        out.write("\t\t    data: $(\"#configure-sp-form\").serialize(),\n");
        out.write("\t\t    success: function(){\n");
        out.write("\t\t    \tlocation.href=redirectURL;\n");
        out.write("\t\t    }\n");
        out.write("\t\t});\n");
        out.write("\t}\n");
        out.write("\n");
        out.write("    function onSamlSsoClick() {\n");
        out.write("\t\tvar spName = document.getElementById(\"oldSPName\").value;\n");
        out.write("\t\tif( spName != '') {\n");
        out.write("\t\t\tupdateBeanAndRedirect(\"../sso-saml/add_service_provider.jsp?spName=\"+spName);\n");
        out.write("\t\t} else {\n");
        out.write("\t\t\tCARBON.showWarningDialog('");
        if (_jspx_meth_fmt_005fmessage_005f1(_jspx_page_context))
            return;
        out.write("');\n");
        out.write("\t\t\tdocument.getElementById(\"saml_link\").href=\"#\"\n");
        out.write("\t\t}\n");
        out.write("\t}\n");
        out.write("\n");
        out.write("\tfunction onKerberosClick() {\n");
        out.write("\t\tvar spName = document.getElementById(\"oldSPName\").value;\n");
        out.write("\t\tif( spName != '') {\n");
        out.write("\t\t\tupdateBeanAndRedirect(\"../servicestore/add-step1.jsp?spName=\"+spName);\n");
        out.write("\t\t} else {\n");
        out.write("\t\t\tCARBON.showWarningDialog('");
        if (_jspx_meth_fmt_005fmessage_005f2(_jspx_page_context))
            return;
        out.write("');\n");
        out.write("\t\t\tdocument.getElementById(\"kerberos_link\").href=\"#\"\n");
        out.write("\t\t}\n");
        out.write("\t}\n");
        out.write("\n");
        out.write("\tfunction onOauthClick() {\n");
        out.write("\t\tvar spName = document.getElementById(\"oldSPName\").value;\n");
        out.write("\t\tif( spName != '') {\n");
        out.write("\t\t\tupdateBeanAndRedirect(\"../oauth/add.jsp?spName=\" + spName);\n");
        out.write("\t\t} else {\n");
        out.write("\t\t\tCARBON.showWarningDialog('");
        if (_jspx_meth_fmt_005fmessage_005f3(_jspx_page_context))
            return;
        out.write("');\n");
        out.write("\t\t\tdocument.getElementById(\"oauth_link\").href=\"#\"\n");
        out.write("\t\t}\n");
        out.write("\t}\n");
        out.write("\t\n");
        out.write("\tfunction onSTSClick() {\n");
        out.write("\t\tvar spName = document.getElementById(\"oldSPName\").value;\n");
        out.write("\t\tif( spName != '') {\n");
        out.write("\t\t\tupdateBeanAndRedirect(\"../generic-sts/sts.jsp?spName=\" + spName);\n");
        out.write("\t\t} else {\n");
        out.write("\t\t\tCARBON.showWarningDialog('");
        if (_jspx_meth_fmt_005fmessage_005f4(_jspx_page_context))
            return;
        out.write("');\n");
        out.write("\t\t\tdocument.getElementById(\"sts_link\").href=\"#\"\n");
        out.write("\t\t}\n");
        out.write("\t}\n");
        out.write("\t\n");
        out.write("\tfunction deleteReqPathRow(obj){\n");
        out.write("    \treqPathAuth--;\n");
        out.write("        jQuery(obj).parent().parent().remove();\n");
        out.write("        if($(jQuery('#permissionAddTable tr')).length == 1){\n");
        out.write("            $(jQuery('#permissionAddTable')).toggle();\n");
        out.write("        }\n");
        out.write("    }\n");
        out.write("\t\n");
        out.write("\tfunction onAdvanceAuthClick() {\n");
        out.write("\t\tlocation.href='configure-authentication-flow.jsp?spName=");
        out.print(Encode.forUriComponent(spName));
        out.write("';\n");
        out.write("\t}\n");
        out.write("    \n");
        out.write("    jQuery(document).ready(function(){\n");
        out.write("        jQuery('#authenticationConfRow').hide();\n");
        out.write("        jQuery('#outboundProvisioning').hide();\n");
        out.write("        jQuery('#inboundProvisioning').hide();  \n");
        out.write("        jQuery('#ReqPathAuth').hide();        \n");
        out.write("        jQuery('#permissionConfRow').hide();\n");
        out.write("        jQuery('#claimsConfRow').hide();\n");
        out.write("        jQuery('h2.trigger').click(function(){\n");
        out.write("            if (jQuery(this).next().is(\":visible\")) {\n");
        out.write("                this.className = \"active trigger\";\n");
        out.write("            } else {\n");
        out.write("                this.className = \"trigger\";\n");
        out.write("            }\n");
        out.write("            jQuery(this).next().slideToggle(\"fast\");\n");
        out.write("            return false; //Prevent the browser jump to the link anchor\n");
        out.write("        });\n");
        out.write("        jQuery('#permissionAddLink').click(function(){\n");
        out.write(
                "            jQuery('#permissionAddTable').append(jQuery('<tr><td class=\"leftCol-big\"><input style=\"width: 98%;\" type=\"text\" id=\"app_permission\" name=\"app_permission\"/></td>' +\n");
        out.write("                    '<td><a onclick=\"deletePermissionRow(this)\" class=\"icon-link\" '+\n");
        out.write("                    'style=\"background-image: url(images/delete.gif)\">'+\n");
        out.write("                    'Delete'+\n");
        out.write("                    '</a></td></tr>'));\n");
        out.write("        });\n");
        out.write("        jQuery('#claimMappingAddLink').click(function(){\n");
        out.write("        \t$('#claimMappingAddTable').show();\n");
        out.write("        \tvar selectedIDPClaimName = $('select[name=idpClaimsList]').val();\n");
        out.write("    \t\tif(!validaForDuplications('.idpClaim', selectedIDPClaimName, 'Local Claim')){\n");
        out.write("    \t\t\treturn false;\n");
        out.write("    \t\t}\n");
        out.write("        \tclaimMappinRowID++;\n");
        out.write("    \t\tvar idpClaimListDiv = $('#localClaimsList').clone();\n");
        out.write("    \t\tif(idpClaimListDiv.length > 0){\n");
        out.write("    \t\t\t$(idpClaimListDiv.find('select')).attr('id','idpClaim_'+ claimMappinRowID);\n");
        out.write("    \t\t\t$(idpClaimListDiv.find('select')).attr('name','idpClaim_'+ claimMappinRowID);\n");
        out.write("    \t\t\t$(idpClaimListDiv.find('select')).addClass( \"idpClaim\" );\n");
        out.write("    \t\t}\n");
        out.write("        \tif($('input:radio[name=claim_dialect]:checked').val() == \"local\")\n");
        out.write("        \t{\n");
        out.write("        \t\t$('.spClaimHeaders').hide();\n");
        out.write("        \t\t$('#roleMappingSelection').hide();\n");
        out.write("            \tjQuery('#claimMappingAddTable').append(jQuery('<tr>'+\n");
        out.write(
                "                        '<td style=\"display:none;\"><input type=\"text\" style=\"width: 98%;\" id=\"spClaim_' + claimMappinRowID + '\" name=\"spClaim_' + claimMappinRowID + '\"/></td> '+\n");
        out.write("            \t        '<td>'+idpClaimListDiv.html()+'</td>' +                        \n");
        out.write(
                "                        '<td style=\"display:none;\"><input type=\"checkbox\"  name=\"spClaim_req_' + claimMappinRowID + '\"  id=\"spClaim_req_' + claimMappinRowID + '\" checked/></td>' + \n");
        out.write(
                "                        '<td><a onclick=\"deleteClaimRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete</a></td>' + \n");
        out.write("                        '</tr>'));\n");
        out.write("        \t}\n");
        out.write("        \telse {\n");
        out.write("        \t\t$('.spClaimHeaders').show();\n");
        out.write("        \t\t$('#roleMappingSelection').show();\n");
        out.write("            \tjQuery('#claimMappingAddTable').append(jQuery('<tr>'+\n");
        out.write(
                "                        '<td><input type=\"text\" class=\"spClaimVal\" style=\"width: 98%;\" id=\"spClaim_' + claimMappinRowID + '\" name=\"spClaim_' + claimMappinRowID + '\"/></td> '+\n");
        out.write("                        '<td>'+idpClaimListDiv.html()+'</td>' +\n");
        out.write(
                "                        '<td><input type=\"checkbox\"  name=\"spClaim_req_' + claimMappinRowID + '\"  id=\"spClaim_req_' + claimMappinRowID + '\"/></td>' + \n");
        out.write(
                "                        '<td><a onclick=\"deleteClaimRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete</a></td>' + \n");
        out.write("                        '</tr>'));\n");
        out.write("            \t$('#spClaim_' + claimMappinRowID).change(function(){\n");
        out.write("            \t\tresetRoleClaims();\n");
        out.write("            \t});\n");
        out.write("        \t}\n");
        out.write("\n");
        out.write("        });\n");
        out.write("        jQuery('#roleMappingAddLink').click(function(){\n");
        out.write("        \troleMappinRowID++;\n");
        out.write("        \t$('#roleMappingAddTable').show();\n");
        out.write(
                "        \tjQuery('#roleMappingAddTable').append(jQuery('<tr><td><input style=\"width: 98%;\" class=\"roleMapIdp\" type=\"text\" id=\"idpRole_'+ roleMappinRowID +'\" name=\"idpRole_'+ roleMappinRowID +'\"/></td>' +\n");
        out.write(
                "                    '<td><input style=\"width: 98%;\" class=\"roleMapSp\" type=\"text\" id=\"spRole_' + roleMappinRowID + '\" name=\"spRole_' + roleMappinRowID + '\"/></td> '+\n");
        out.write(
                "                    '<td><a onclick=\"deleteRoleMappingRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete</a>' + \n");
        out.write("                    '</td></tr>'));\n");
        out.write("        })\n");
        out.write("         jQuery('#reqPathAuthenticatorAddLink').click(function(){\n");
        out.write("        \treqPathAuth++;\n");
        out.write("    \t\tvar selectedRePathAuthenticator =jQuery(this).parent().children()[0].value;\n");
        out.write(
                "    \t\tif(!validaForDuplications('[name=req_path_auth]', selectedRePathAuthenticator, \"Configuration\")){\n");
        out.write("    \t\t\treturn false;\n");
        out.write("    \t\t}\n");
        out.write("    \t\t\n");
        out.write("    \t\tjQuery(this)\n");
        out.write("    \t\t\t\t.parent()\n");
        out.write("    \t\t\t\t.parent()\n");
        out.write("    \t\t\t\t.parent()\n");
        out.write("    \t\t\t\t.parent()\n");
        out.write("    \t\t\t\t.append(\n");
        out.write(
                "    \t\t\t\t\t\tjQuery('<tr><td><input name=\"req_path_auth' + '\" id=\"req_path_auth\" type=\"hidden\" value=\"' + selectedRePathAuthenticator + '\" />'+ selectedRePathAuthenticator +'</td><td class=\"leftCol-small\" ><a onclick=\"deleteReqPathRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a></td></tr>'));\n");
        out.write("    \t\t\n");
        out.write("        });\n");
        out.write("        \n");
        out.write("        $(\"[name=claim_dialect]\").click(function(){\n");
        out.write("        \t\tvar element = $(this);\n");
        out.write("        \t\tclaimMappinRowID = -1;\n");
        out.write("        \t\t\n");
        out.write("        \t\tif($('.idpClaim').length > 0){\n");
        out.write(
                "                    CARBON.showConfirmationDialog('Changing dialect will delete all claim mappings. Do you want to proceed?',\n");
        out.write("                            function (){\n");
        out.write("                    \t\t\t$.each($('.idpClaim'), function(){\n");
        out.write("                    \t\t    \t$(this).parent().parent().remove();\n");
        out.write("                    \t\t\t});\n");
        out.write("                    \t\t\t$('#claimMappingAddTable').hide();\n");
        out.write("                    \t\t\tchangeDialectUIs(element);\n");
        out.write("                           \t},\n");
        out.write("                    \t\tfunction(){\n");
        out.write("                           \t\t//Reset checkboxes\n");
        out.write(
                "                           \t\t$('#claim_dialect_wso2').attr('checked', (element.val() == 'custom'));\n");
        out.write(
                "                           \t\t$('#claim_dialect_custom').attr('checked', (element.val() == 'local'));\n");
        out.write("                           \t});\n");
        out.write("        \t\t}else{\n");
        out.write("        \t\t\t$('#claimMappingAddTable').hide();\n");
        out.write("        \t\t\tchangeDialectUIs(element);\n");
        out.write("        \t\t}\n");
        out.write("        });\n");
        out.write("        \n");
        out.write("        if($('#isNeedToUpdate').val() == 'true'){\n");
        out.write("        \t$('#isNeedToUpdate').val('false');\n");
        out.write(
                "    \t\tvar numberOfClaimMappings = document.getElementById(\"claimMappingAddTable\").rows.length;\n");
        out.write("    \t\tdocument.getElementById('number_of_claimmappings').value=numberOfClaimMappings;\n");
        out.write("    \t\t\n");
        out.write(
                "    \t\tvar numberOfPermissions = document.getElementById(\"permissionAddTable\").rows.length;\n");
        out.write("    \t\tdocument.getElementById('number_of_permissions').value=numberOfPermissions;\n");
        out.write("    \t\t\n");
        out.write(
                "    \t\tvar numberOfRoleMappings = document.getElementById(\"roleMappingAddTable\").rows.length;\n");
        out.write("    \t\tdocument.getElementById('number_of_rolemappings').value=numberOfRoleMappings;\n");
        out.write("    \t\t\n");
        out.write("    \t\t$.ajax({\n");
        out.write("    \t\t    type: \"POST\",\n");
        out.write("    \t\t\turl: 'configure-service-provider-update.jsp?spName=");
        out.print(Encode.forUriComponent(spName));
        out.write("',\n");
        out.write("    \t\t    data: $(\"#configure-sp-form\").serialize()\n");
        out.write("    \t\t});\n");
        out.write("        }\n");
        out.write("    });\n");
        out.write("    \n");
        out.write("    function resetRoleClaims(){\n");
        out.write("\t    $(\"#roleClaim option\").filter(function() {\n");
        out.write("\t           return $(this).val().length > 0;\n");
        out.write("\t    }).remove();\n");
        out.write("\t    $(\"#subject_claim_uri option\").filter(function() {\n");
        out.write("\t           return $(this).val().length > 0;\n");
        out.write("\t    }).remove();\n");
        out.write("\t    $.each($('.spClaimVal'), function(){\n");
        out.write("\t    \tif($(this).val().length > 0){\n");
        out.write(
                "\t\t    \t$(\"#roleClaim\").append('<option value=\"'+$(this).val()+'\">'+$(this).val()+'</option>');\n");
        out.write(
                "\t\t    \t$('#subject_claim_uri').append('<option value=\"'+$(this).val()+'\">'+$(this).val()+'</option>');\n");
        out.write("\t    \t}\n");
        out.write("\t    });\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("    function changeDialectUIs(element){\n");
        out.write("\t    $(\"#roleClaim option\").filter(function() {\n");
        out.write("\t           return $(this).val().length > 0;\n");
        out.write("\t    }).remove();\n");
        out.write("\t    \n");
        out.write("\t    $(\"#subject_claim_uri option\").filter(function() {\n");
        out.write("\t           return $(this).val().length > 0;\n");
        out.write("\t    }).remove();\n");
        out.write("\t    \n");
        out.write("\t\tif(element.val() == 'local'){\n");
        out.write("\t\t\t$('#addClaimUrisLbl').text('Requested Claims:');\n");
        out.write("\t\t\t$('#roleMappingSelection').hide();\n");
        out.write("\t\t\tif($('#local_calim_uris').length > 0 && $('#local_calim_uris').val().length > 0){\n");
        out.write("\t\t\t\tvar dataArray = $('#local_calim_uris').val().split(',');\n");
        out.write("\t\t\t\tif(dataArray.length > 0){\n");
        out.write("\t\t\t\t\tvar optionsList = \"\";\n");
        out.write("\t\t\t\t\t$.each(dataArray, function(){\n");
        out.write("\t\t\t\t\t\tif(this.length > 0){\n");
        out.write("\t\t\t\t\t\t\toptionsList += '<option value='+this+'>'+this+'</option>'\n");
        out.write("\t\t\t\t\t\t}\n");
        out.write("\t\t\t\t\t});\n");
        out.write("\t\t\t\t\tif(optionsList.length > 0){\n");
        out.write("\t\t\t\t\t\t$('#subject_claim_uri').append(optionsList);\n");
        out.write("\t\t\t\t\t}\n");
        out.write("\t\t\t\t}\n");
        out.write("\t\t\t} \n");
        out.write("\t\t}else{\n");
        out.write("\t\t\t$('#addClaimUrisLbl').text('Identity Provider Claim URIs:');\n");
        out.write("\t\t\t$('#roleMappingSelection').show();\n");
        out.write("\t\t}\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("    function deleteClaimRow(obj){\n");
        out.write("    \tif($('input:radio[name=claim_dialect]:checked').val() == \"custom\"){\n");
        out.write("    \t\tif($(obj).parent().parent().find('input.spClaimVal').val().length > 0){\n");
        out.write(
                "    \t\t\t$('#roleClaim option[value=\"'+$(obj).parent().parent().find('input.spClaimVal').val()+'\"]').remove();\n");
        out.write(
                "    \t\t\t$('#subject_claim_uri option[value=\"'+$(obj).parent().parent().find('input.spClaimVal').val()+'\"]').remove();\n");
        out.write("    \t\t}\n");
        out.write("    \t}\n");
        out.write("    \t\n");
        out.write("    \tjQuery(obj).parent().parent().remove();\n");
        out.write("\t\tif($('.idpClaim').length == 0){\n");
        out.write("\t\t\t$('#claimMappingAddTable').hide();\n");
        out.write("\t\t}\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("    function deleteRoleMappingRow(obj){\n");
        out.write("    \tjQuery(obj).parent().parent().remove();\n");
        out.write("    \tif($('.roleMapIdp').length == 0){\n");
        out.write("    \t\t$('#roleMappingAddTable').hide();\n");
        out.write("    \t}\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("    function deletePermissionRow(obj){\n");
        out.write("    \tjQuery(obj).parent().parent().remove();\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("    var deletePermissionRows = [];\n");
        out.write("    function deletePermissionRowOld(obj){\n");
        out.write("        if(jQuery(obj).parent().prev().children()[0].value != ''){\n");
        out.write("        \tdeletePermissionRows.push(jQuery(obj).parent().prev().children()[0].value);\n");
        out.write("        }\n");
        out.write("        jQuery(obj).parent().parent().remove();\n");
        out.write("        if($(jQuery('#permissionAddTable tr')).length == 1){\n");
        out.write("            $(jQuery('#permissionAddTable')).toggle();\n");
        out.write("        }\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("    function addIDPRow(obj) {\n");
        out.write("\t\tvar selectedObj = jQuery(obj).prev().find(\":selected\");\n");
        out.write("\n");
        out.write("\t\tvar selectedIDPName = selectedObj.val(); \n");
        out.write(
                "\t\tif(!validaForDuplications('[name=provisioning_idp]', selectedIDPName, 'Configuration')){\n");
        out.write("\t\t\treturn false;\n");
        out.write("\t\t}\n");
        out.write("\n");
        out.write("\t\t//var stepID = jQuery(obj).parent().children()[1].value;\n");
        out.write("\t\tvar dataArray =  selectedObj.attr('data').split(',');\n");
        out.write(
                "\t\tvar newRow = '<tr><td><input name=\"provisioning_idp\" id=\"\" type=\"hidden\" value=\"' + selectedIDPName + '\" />' + selectedIDPName + ' </td><td> <select name=\"provisioning_con_idp_' + selectedIDPName + '\" style=\"float: left; min-width: 150px;font-size:13px;\">';\n");
        out.write("\t\tfor(var i=0;i<dataArray.length;i++){\n");
        out.write("\t\t\tif(dataArray[i].length > 0){\n");
        out.write("\t\t\t\tnewRow+='<option>'+dataArray[i]+'</option>';\t\t\t\t\t\n");
        out.write("\t\t\t}\n");
        out.write("\t\t}\n");
        out.write(
                "\t\tnewRow+='</select></td><td><input type=\"checkbox\" name=\"blocking_prov_' + selectedIDPName +\n");
        out.write(
                "\t\t\t\t'\"  />Blocking</td><td><input type=\"checkbox\" name=\"provisioning_jit_' + selectedIDPName +\n");
        out.write(
                "\t\t\t\t'\"  />JIT Outbound</td><td class=\"leftCol-small\" ><a onclick=\"deleteIDPRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a></td></tr>';\n");
        out.write("\t\tjQuery(obj)\n");
        out.write("\t\t\t\t.parent()\n");
        out.write("\t\t\t\t.parent()\n");
        out.write("\t\t\t\t.parent()\n");
        out.write("\t\t\t\t.parent()\n");
        out.write("\t\t\t\t.append(\n");
        out.write("\t\t\t\t\t\tjQuery(newRow));\t\n");
        out.write("\t\t}\t\n");
        out.write("    \n");
        out.write("    function deleteIDPRow(obj){\n");
        out.write("        jQuery(obj).parent().parent().remove();\n");
        out.write("    }\n");
        out.write("    \n");
        out.write("\tfunction validaForDuplications(selector, authenticatorName, type){\n");
        out.write("\t\tif($(selector).length > 0){\n");
        out.write("\t\t\tvar isNew = true;\n");
        out.write("\t\t\t$.each($(selector),function(){\n");
        out.write("\t\t\t\tif($(this).val() == authenticatorName){\n");
        out.write("\t\t\t\t\tCARBON.showWarningDialog(type+' \"'+authenticatorName+'\" is already added');\n");
        out.write("\t\t\t\t\tisNew = false;\n");
        out.write("\t\t\t\t\treturn false;\n");
        out.write("\t\t\t\t}\n");
        out.write("\t\t\t});\n");
        out.write("\t\t\tif(!isNew){\n");
        out.write("\t\t\t\treturn false;\n");
        out.write("\t\t\t}\n");
        out.write("\t\t}\n");
        out.write("\t\treturn true;\n");
        out.write("\t}\n");
        out.write("\t\n");
        out.write("\tfunction showHidePassword(element, inputId){\n");
        out.write("\t\tif($(element).text()=='Show'){\n");
        out.write("\t\t\tdocument.getElementById(inputId).type = 'text';\n");
        out.write("\t\t\t$(element).text('Hide');\n");
        out.write("\t\t}else{\n");
        out.write("\t\t\tdocument.getElementById(inputId).type = 'password';\n");
        out.write("\t\t\t$(element).text('Show');\n");
        out.write("\t\t}\n");
        out.write("\t}\n");
        out.write("    \n");
        out.write("    function disable() {\n");
        out.write(
                "        document.getElementById(\"scim-inbound-userstore\").disabled =!document.getElementById(\"scim-inbound-userstore\").disabled;\n");
        out.write(
                "        document.getElementById(\"dumb\").value = document.getElementById(\"scim-inbound-userstore\").disabled;\n");
        out.write("    }\n");
        out.write("\n");
        out.write("    function validateTextForIllegal(fld) {\n");
        out.write(
                "        var isValid = doValidateInput(fld, \"Provided Service Provider name is invalid.\");\n");
        out.write("        if (isValid) {\n");
        out.write("            return true;\n");
        out.write("        } else {\n");
        out.write("            return false;\n");
        out.write("        }\n");
        out.write("    }\n");
        out.write("</script>\n");
        out.write("\n");
        //  fmt:bundle
        org.apache.taglibs.standard.tag.rt.fmt.BundleTag _jspx_th_fmt_005fbundle_005f0 = (org.apache.taglibs.standard.tag.rt.fmt.BundleTag) _005fjspx_005ftagPool_005ffmt_005fbundle_0026_005fbasename
                .get(org.apache.taglibs.standard.tag.rt.fmt.BundleTag.class);
        _jspx_th_fmt_005fbundle_005f0.setPageContext(_jspx_page_context);
        _jspx_th_fmt_005fbundle_005f0.setParent(null);
        // /application/configure-service-provider.jsp(718,0) name = basename type = null reqTime = true required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_fmt_005fbundle_005f0.setBasename("org.wso2.carbon.identity.application.mgt.ui.i18n.Resources");
        int _jspx_eval_fmt_005fbundle_005f0 = _jspx_th_fmt_005fbundle_005f0.doStartTag();
        if (_jspx_eval_fmt_005fbundle_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
            if (_jspx_eval_fmt_005fbundle_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                out = _jspx_page_context.pushBody();
                _jspx_th_fmt_005fbundle_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                _jspx_th_fmt_005fbundle_005f0.doInitBody();
            }
            do {
                out.write("\n");
                out.write("    <div id=\"middle\">\n");
                out.write("        <h2>\n");
                out.write("            ");
                if (_jspx_meth_fmt_005fmessage_005f5(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("        </h2>\n");
                out.write("        <div id=\"workArea\">\n");
                out.write(
                        "            <form id=\"configure-sp-form\" method=\"post\" name=\"configure-sp-form\" method=\"post\" action=\"configure-service-provider-finish.jsp\" >\n");
                out.write("            <input type=\"hidden\" name=\"oldSPName\" id=\"oldSPName\" value=\"");
                out.print(Encode.forHtmlAttribute(spName));
                out.write("\"/>\n");
                out.write("            <input type=\"hidden\" id=\"isNeedToUpdate\" value=\"");
                out.print(isNeedToUpdate);
                out.write("\"/>\n");
                out.write("            <div class=\"sectionSeperator togglebleTitle\">");
                if (_jspx_meth_fmt_005fmessage_005f6(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</div>\n");
                out.write("            <div class=\"sectionSub\">\n");
                out.write("                <table class=\"carbonFormTable\">\n");
                out.write("                    <tr>\n");
                out.write("                        <td style=\"width:15%\" class=\"leftCol-med labelField\">");
                if (_jspx_meth_fmt_005fmessage_005f7(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":<span class=\"required\">*</span></td>\n");
                out.write("                        <td>\n");
                out.write(
                        "                            <input style=\"width:50%\" id=\"spName\" name=\"spName\" type=\"text\" value=\"");
                out.print(Encode.forHtmlAttribute(spName));
                out.write("\" white-list-patterns=\"^[a-zA-Z0-9._|-]*$\" autofocus/>\n");
                out.write("                            <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f8(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    <tr>\n");
                out.write(
                        "                       <td style=\"width:15%\" class=\"leftCol-med labelField\">Description:</td>                   \n");
                out.write("                     <td>\n");
                out.write(
                        "                        <textarea style=\"width:50%\" type=\"text\" name=\"sp-description\" id=\"sp-description\" class=\"text-box-big\">");
                out.print(appBean.getServiceProvider().getDescription() != null
                        ? Encode.forHtmlContent(appBean.getServiceProvider().getDescription())
                        : "");
                out.write("</textarea>\n");
                out.write("                        <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f9(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    <tr>\n");
                out.write("                    \t<td class=\"leftCol-med\">\n");
                out.write("                             <label for=\"isSaasApp\">");
                if (_jspx_meth_fmt_005fmessage_005f10(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("                        </td>\n");
                out.write("                        <td>\n");
                out.write("                            <div class=\"sectionCheckbox\">\n");
                out.write(
                        "                                <input type=\"checkbox\"  id=\"isSaasApp\" name=\"isSaasApp\" ");
                out.print(appBean.getServiceProvider().getSaasApp() ? "checked" : "");
                out.write("/>\n");
                out.write(
                        "                                <span style=\"display:inline-block\" class=\"sectionHelp\">\n");
                out.write("                                    ");
                if (_jspx_meth_fmt_005fmessage_005f11(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                                </span>\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                </table>\n");
                out.write("            </div>\n");
                out.write("\n");
                out.write("\t\t\t<h2 id=\"claims_head\" class=\"sectionSeperator trigger active\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f12(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("            </h2>\n");
                out.write(
                        "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"claimsConfRow\">\n");
                out.write(
                        "                   <table style=\"padding-top: 5px; padding-bottom: 10px;\" class=\"carbonFormTable\">\n");
                out.write("                    \t<tr>\n");
                out.write("                    \t\t<td class=\"leftCol-med labelField\">\n");
                out.write("                    \t\t\t");
                if (_jspx_meth_fmt_005fmessage_005f13(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":\n");
                out.write("                    \t\t</td>\n");
                out.write("                    \t\t<td class=\"leftCol-med\">\n");
                out.write(
                        "                    \t\t\t<input type=\"radio\" id=\"claim_dialect_wso2\" name=\"claim_dialect\" value=\"local\" ");
                out.print(isLocalClaimsSelected ? "checked" : "");
                out.write("><label for=\"claim_dialect_wso2\" style=\"cursor: pointer;\">");
                if (_jspx_meth_fmt_005fmessage_005f14(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("                    \t\t</td>\n");
                out.write("                    \t</tr>\n");
                out.write("                \t\t<tr>\n");
                out.write(
                        "                \t\t    <td style=\"width:15%\" class=\"leftCol-med labelField\">\n");
                out.write("                    \t\t</td>\n");
                out.write("                \t\t\t<td class=\"leftCol-med\">\n");
                out.write(
                        "                    \t\t\t<input type=\"radio\" id=\"claim_dialect_custom\" name=\"claim_dialect\" value=\"custom\" ");
                out.print(!isLocalClaimsSelected ? "checked" : "");
                out.write("><label for=\"claim_dialect_custom\" style=\"cursor: pointer;\">");
                if (_jspx_meth_fmt_005fmessage_005f15(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("                    \t\t</td>\n");
                out.write("                    \t</tr>\n");
                out.write("                    </table>\n");
                out.write("                    <table  class=\"carbonFormTable\">\n");
                out.write("\t\t\t\t\t<tr>\n");
                out.write("\t\t\t\t\t\t<td class=\"leftCol-med labelField\" style=\"width:15%\">\n");
                out.write("\t\t\t\t\t\t\t<label id=\"addClaimUrisLbl\">");
                out.print(isLocalClaimsSelected ? "Requested Claims:" : "Identity Provider Claim URIs:");
                out.write("</label>\n");
                out.write("\t\t\t\t\t\t</td>\n");
                out.write("\t\t\t\t\t\t<td class=\"leftCol-med\">\n");
                out.write(
                        "\t\t\t\t\t\t\t<a id=\"claimMappingAddLink\" class=\"icon-link\" style=\"background-image: url(images/add.gif); margin-top: 0px !important; margin-bottom: 5px !important; margin-left: 5px;\">");
                if (_jspx_meth_fmt_005fmessage_005f16(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write(
                        "                            <table class=\"styledLeft\" id=\"claimMappingAddTable\" style=\"");
                out.print(claimMapping == null || claimMapping.isEmpty() ? "display:none" : "");
                out.write("\">\n");
                out.write("                              <thead><tr>\n");
                out.write("                              <th class=\"leftCol-big spClaimHeaders\" style=\"");
                out.print(isLocalClaimsSelected ? "display:none;" : "");
                out.write('"');
                out.write('>');
                if (_jspx_meth_fmt_005fmessage_005f17(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th>\n");
                out.write("                              <th class=\"leftCol-big\">");
                if (_jspx_meth_fmt_005fmessage_005f18(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th>\n");
                out.write("                              <th class=\"leftCol-mid spClaimHeaders\" style=\"");
                out.print(isLocalClaimsSelected ? "display:none;" : "");
                out.write('"');
                out.write('>');
                if (_jspx_meth_fmt_005fmessage_005f19(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th>\n");
                out.write("                              \n");
                out.write("                              <th>");
                if (_jspx_meth_fmt_005fmessage_005f20(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th></tr></thead>\n");
                out.write("                              <tbody>\n");
                out.write("                              ");
                if (claimMapping != null && !claimMapping.isEmpty()) {
                    out.write("\n");
                    out.write("                          \n");
                    out.write("                               ");

                    int i = -1;
                    for (Map.Entry<String, String> entry : claimMapping.entrySet()) {
                        i++;

                        out.write("\n");
                        out.write("                               <tr>\n");
                        out.write("                                   <td style=\"");
                        out.print(isLocalClaimsSelected ? "display:none;" : "");
                        out.write(
                                "\"><input type=\"text\" class=\"spClaimVal\" style=\"width: 98%;\" value=\"");
                        out.print(Encode.forHtmlAttribute(entry.getValue()));
                        out.write("\" id=\"spClaim_");
                        out.print(i);
                        out.write("\" name=\"spClaim_");
                        out.print(i);
                        out.write("\" readonly=\"readonly\"/></td>\n");
                        out.write("                               \t<td>\n");
                        out.write("\t\t\t\t\t\t\t\t\t<select id=\"idpClaim_");
                        out.print(i);
                        out.write("\" name=\"idpClaim_");
                        out.print(i);
                        out.write("\" class=\"idpClaim\" style=\"float:left; width: 100%\">\t\t\t\t\t\t\n");
                        out.write("\t\t\t\t\t\t\t\t\t\t");
                        String[] localClaims = appBean.getClaimUris();
                        for (String localClaimName : localClaims) {
                            if (localClaimName.equals(entry.getKey())) {
                                out.write("\n");
                                out.write("\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(localClaimName));
                                out.write("\" selected> ");
                                out.print(Encode.forHtmlContent(localClaimName));
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t\t\t\t");
                            } else {
                                out.write(" \n");
                                out.write("\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(localClaimName));
                                out.write('"');
                                out.write('>');
                                out.write(' ');
                                out.print(Encode.forHtmlContent(localClaimName));
                                out.write("</option>\n");
                                out.write("\t\t\t\t\t\t\t\t\t\t");
                            }
                        }
                        out.write("\n");
                        out.write("\t\t\t\t\t\t\t\t\t</select>\n");
                        out.write(
                                "                               \t</td>                                   \n");
                        out.write("                                   <td style=\"");
                        out.print(isLocalClaimsSelected ? "display:none;" : "");
                        out.write("\">\n");
                        out.write("                                   ");
                        if ("true".equals(appBean.getRequestedClaims().get(entry.getValue()))) {
                            out.write("                                 \n");
                            out.write(
                                    "                                   <input type=\"checkbox\"  id=\"spClaim_req_");
                            out.print(i);
                            out.write("\" name=\"spClaim_req_");
                            out.print(i);
                            out.write("\" checked/>\n");
                            out.write("                                   ");
                        } else {
                            out.write("\n");
                            out.write(
                                    "                                    <input type=\"checkbox\"  id=\"spClaim_req_");
                            out.print(i);
                            out.write("\" name=\"spClaim_req_");
                            out.print(i);
                            out.write("\" />\n");
                            out.write("                                   ");
                        }
                        out.write("\n");
                        out.write("                                   </td>\n");
                        out.write("                                  \n");
                        out.write("                                   <td>\n");
                        out.write("                                       <a title=\"");
                        if (_jspx_meth_fmt_005fmessage_005f21(_jspx_th_fmt_005fbundle_005f0,
                                _jspx_page_context))
                            return;
                        out.write("\"\n");
                        out.write(
                                "                                          onclick=\"deleteClaimRow(this);return false;\"\n");
                        out.write("                                          href=\"#\"\n");
                        out.write("                                          class=\"icon-link\"\n");
                        out.write(
                                "                                          style=\"background-image: url(images/delete.gif)\">\n");
                        out.write("                                           ");
                        if (_jspx_meth_fmt_005fmessage_005f22(_jspx_th_fmt_005fbundle_005f0,
                                _jspx_page_context))
                            return;
                        out.write("\n");
                        out.write("                                       </a>\n");
                        out.write("                                   </td>\n");
                        out.write("                               </tr>\n");
                        out.write("                               ");
                    }
                    out.write("\n");
                    out.write("                              ");
                }
                out.write("\n");
                out.write("                              </tbody>\n");
                out.write("                    \t\t</table>\n");
                out.write("\t\t\t\t\t\t</td>\n");
                out.write("\t\t\t\t\t</tr>\n");
                out.write("\n");
                out.write("                    <tr>\n");
                out.write("                    \t\t<td class=\"leftCol-med labelField\">");
                if (_jspx_meth_fmt_005fmessage_005f23(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":\n");
                out.write("                        \t<td>\n");
                out.write(
                        "                        \t<select class=\"leftCol-med\" id=\"subject_claim_uri\" name=\"subject_claim_uri\" style=\" margin-left: 5px; \">\n");
                out.write("                        \t\t<option value=\"\">---Select---</option>\n");
                out.write("                        \t\t");
                if (isLocalClaimsSelected) {
                    String[] localClaimUris = appBean.getClaimUris();
                    for (String localClaimName : localClaimUris) {
                        if (appBean.getSubjectClaimUri() != null
                                && localClaimName.equals(appBean.getSubjectClaimUri())) {
                            out.write("\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                            out.print(Encode.forHtmlAttribute(localClaimName));
                            out.write("\" selected> ");
                            out.print(Encode.forHtmlContent(localClaimName));
                            out.write("</option>\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t");
                        } else {
                            out.write("\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                            out.print(Encode.forHtmlAttribute(localClaimName));
                            out.write('"');
                            out.write('>');
                            out.write(' ');
                            out.print(Encode.forHtmlContent(localClaimName));
                            out.write("</option>\n");
                            out.write("\t\t\t\t\t\t\t\t\t");
                        }
                    }
                } else {
                    for (Map.Entry<String, String> entry : claimMapping.entrySet()) {
                        out.write("\n");
                        out.write("                        \t\t\t ");
                        if (entry.getValue() != null && !entry.getValue().isEmpty()) {
                            if (appBean.getSubjectClaimUri() != null
                                    && appBean.getSubjectClaimUri().equals(entry.getValue())) {
                                out.write("\n");
                                out.write("                        \t\t\t\t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(entry.getValue()));
                                out.write("\" selected> ");
                                out.print(Encode.forHtmlContent(entry.getValue()));
                                out.write("</option>\n");
                                out.write("                        \t\t\t\t");
                            } else {
                                out.write("\n");
                                out.write("                            \t\t\t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(entry.getValue()));
                                out.write('"');
                                out.write('>');
                                out.write(' ');
                                out.print(Encode.forHtmlContent(entry.getValue()));
                                out.write("</option>\n");
                                out.write("                            \t\t\t ");
                            }
                        }
                    }
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t\t</select>\n");
                out.write("\t\t\t\t\t\t\t</td>\n");
                out.write("                    \t</tr>\n");
                out.write("                    </table>\n");
                out.write("\n");
                out.write(
                        "                    <input type=\"hidden\" name=\"number_of_claimmappings\" id=\"number_of_claimmappings\" value=\"1\">\n");
                out.write("                    <div id=\"localClaimsList\" style=\"display: none;\">\n");
                out.write("                  \t\t<select style=\"float:left; width: 100%\">\t\t\t\t\t\t\t\n");
                out.write("\t\t\t\t\t\t\t");
                String[] localClaims = appBean.getClaimUris();
                StringBuffer allLocalClaims = new StringBuffer();
                for (String localClaimName : localClaims) {
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t\t<option value=\"");
                    out.print(Encode.forHtmlAttribute(localClaimName));
                    out.write('"');
                    out.write('>');
                    out.write(' ');
                    out.print(Encode.forHtmlContent(localClaimName));
                    out.write("</option>\n");
                    out.write("\t\t\t\t\t\t\t\t");

                    allLocalClaims.append(localClaimName + ",");
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t\t</select>\n");
                out.write("\t\t\t\t\t</div>\n");
                out.write("\t\t\t\t\t<input type=\"hidden\" id =\"local_calim_uris\" value=\"");
                out.print(Encode.forHtmlAttribute(allLocalClaims.toString()));
                out.write("\" >\n");
                out.write("                  \t<div id=\"roleMappingSelection\" style=\"");
                out.print(isLocalClaimsSelected ? "display:none" : "");
                out.write("\">\n");
                out.write(
                        "                    <table class=\"carbonFormTable\" style=\"padding-top: 10px\">\n");
                out.write("                  \t<tr>\n");
                out.write("                  \t\t<td class=\"leftCol-med labelField\" style=\"width:15%\">\n");
                out.write("\t\t\t\t\t\t\t<label id=\"addClaimUrisLbl\">");
                if (_jspx_meth_fmt_005fmessage_005f24(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":</label>\n");
                out.write("\t\t\t\t\t\t</td>\n");
                out.write("                        <td >\n");
                out.write(
                        "                        \t<select id=\"roleClaim\" name=\"roleClaim\" style=\"float:left;min-width: 250px;\">\n");
                out.write("                        \t\t<option value=\"\">---Select---</option>\n");
                out.write("                        \t\t");
                if (!isLocalClaimsSelected) {
                    for (Map.Entry<String, String> entry : claimMapping.entrySet()) {
                        out.write("\n");
                        out.write("                        \t\t\t ");
                        if (entry.getValue() != null && !entry.getValue().isEmpty()) {
                            if (appBean.getRoleClaimUri() != null
                                    && appBean.getRoleClaimUri().equals(entry.getValue())) {
                                out.write("\n");
                                out.write("                        \t\t\t\t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(entry.getValue()));
                                out.write("\" selected> ");
                                out.print(Encode.forHtmlContent(entry.getValue()));
                                out.write("</option>\n");
                                out.write("                        \t\t\t\t");
                            } else {
                                out.write("\n");
                                out.write("                            \t\t\t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(entry.getValue()));
                                out.write('"');
                                out.write('>');
                                out.write(' ');
                                out.print(Encode.forHtmlContent(entry.getValue()));
                                out.write("</option>\n");
                                out.write("                            \t\t\t");
                            }
                        }
                        out.write("\n");
                        out.write("                        \t\t\t");
                    }
                    out.write("\t\n");
                    out.write("                        \t\t");
                }
                out.write("\t\t\t\t\t\t\n");
                out.write("\t\t\t\t\t\t\t</select>\n");
                out.write("\t\t\t\t\t\t</td>\n");
                out.write("\t\t\t\t\t</tr>\n");
                out.write("\t\t\t\t\t<tr>\n");
                out.write("\t\t\t\t\t\t<td class=\"leftCol-med\" style=\"width:15%\"></td>\n");
                out.write("\t\t\t\t\t\t<td>\n");
                out.write("                           <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f25(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    </table>\n");
                out.write("                    </div>\n");
                out.write("            </div>\n");
                out.write("              \n");
                out.write(
                        "\t\t\t<h2 id=\"authorization_permission_head\" class=\"sectionSeperator trigger active\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f26(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("            </h2>\n");
                out.write(
                        "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"permissionConfRow\">\n");
                out.write(
                        "            <h2 id=\"permission_mapping_head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                \t\t<a href=\"#\">Permissions</a>\n");
                out.write("            \t\t</h2>\n");
                out.write(
                        "            \t   <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display: none;\" id=\"appPermissionRow\">\n");
                out.write("                <table class=\"carbonFormTable\">\n");
                out.write("                   <tr>\n");
                out.write("                        <td>\n");
                out.write(
                        "                            <a id=\"permissionAddLink\" class=\"icon-link\" style=\"background-image:url(images/add.gif);margin-left:0;\">");
                if (_jspx_meth_fmt_005fmessage_005f27(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("                            <div style=\"clear:both\"></div>\n");
                out.write("                           \t<div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f28(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write(
                        "                            <table class=\"styledLeft\" id=\"permissionAddTable\" >\n");
                out.write("                                <thead>\n");
                out.write("                                </thead>\n");
                out.write("                                <tbody>\n");
                out.write("                                ");
                if (permissions != null && !permissions.isEmpty()) {
                    out.write("\n");
                    out.write("                               \n");
                    out.write("                                ");
                    for (int i = 0; i < permissions.size(); i++) {
                        if (permissions.get(i) != null) {

                            out.write("\n");
                            out.write("                                \n");
                            out.write("                                <tr>\n");
                            out.write(
                                    "                                    <td class=\"leftCol-big\"><input style=\"width: 98%;\" type=\"text\" value=\"");
                            out.print(Encode.forHtmlAttribute(permissions.get(i)));
                            out.write(
                                    "\" id=\"app_permission\" name=\"app_permission\" readonly=\"readonly\"/></td>\n");
                            out.write("                                    <td>\n");
                            out.write("                                        <a title=\"");
                            if (_jspx_meth_fmt_005fmessage_005f29(_jspx_th_fmt_005fbundle_005f0,
                                    _jspx_page_context))
                                return;
                            out.write("\"\n");
                            out.write(
                                    "                                           onclick=\"deletePermissionRow(this);return false;\"\n");
                            out.write("                                           href=\"#\"\n");
                            out.write("                                           class=\"icon-link\"\n");
                            out.write(
                                    "                                           style=\"background-image: url(images/delete.gif)\">\n");
                            out.write("                                            ");
                            if (_jspx_meth_fmt_005fmessage_005f30(_jspx_th_fmt_005fbundle_005f0,
                                    _jspx_page_context))
                                return;
                            out.write("\n");
                            out.write("                                        </a>\n");
                            out.write("                                    </td>\n");
                            out.write("                                </tr>\n");
                            out.write("                                ");
                        }
                    }
                    out.write("\n");
                    out.write("                                ");
                }
                out.write("\n");
                out.write("                                </tbody>\n");
                out.write("                            </table>\n");
                out.write("                            <div style=\"clear:both\"/>\n");
                out.write(
                        "                            <input type=\"hidden\" name=\"number_of_permissions\" id=\"number_of_permissions\" value=\"1\">\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    \n");
                out.write("\t\t\t\t\t</table>\n");
                out.write("\t\t\t\t\t</div>\n");
                out.write(
                        "\t\t\t\t\t<h2 id=\"role_mapping_head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                \t\t<a href=\"#\">Role Mapping</a>\n");
                out.write("            \t\t</h2>\n");
                out.write(
                        "            \t   <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display: none;\" id=\"roleMappingRowRow\">\n");
                out.write("                    <table>\n");
                out.write("                    <tr>\n");
                out.write("\t\t\t\t\t\t<td>\n");
                out.write(
                        "\t\t\t\t\t\t\t<a id=\"roleMappingAddLink\" class=\"icon-link\" style=\"background-image: url(images/add.gif);margin-left:0;\">");
                if (_jspx_meth_fmt_005fmessage_005f31(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("\t\t\t\t\t\t\t<div style=\"clear:both\"/>\n");
                out.write("                            <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f32(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("\t\t\t\t\t\t</td>\n");
                out.write("\t\t\t\t\t</tr>\n");
                out.write("                    </table>\n");
                out.write(
                        "\t\t\t\t\t<table class=\"styledLeft\" id=\"roleMappingAddTable\" style=\"display:none\">\n");
                out.write("                              <thead><tr><th class=\"leftCol-big\">");
                if (_jspx_meth_fmt_005fmessage_005f33(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th><th class=\"leftCol-big\">");
                if (_jspx_meth_fmt_005fmessage_005f34(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th><th>");
                if (_jspx_meth_fmt_005fmessage_005f35(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</th></tr></thead>\n");
                out.write("                              <tbody>\n");
                out.write("                              ");
                if (roleMapping != null && !roleMapping.isEmpty()) {
                    out.write("\n");
                    out.write("                              <script>\n");
                    out.write(
                            "                                  $(jQuery('#roleMappingAddTable')).toggle();\n");
                    out.write("                              </script>\n");
                    out.write("                               ");

                    int i = -1;
                    for (Map.Entry<String, String> entry : roleMapping.entrySet()) {
                        i++;

                        out.write("\n");
                        out.write("                               <tr>\n");
                        out.write("                               \t<td >\n");
                        out.write(
                                "                               \t\t<input style=\"width: 98%;\" class=\"roleMapIdp\" type=\"text\" value=\"");
                        out.print(Encode.forHtmlAttribute(entry.getKey()));
                        out.write("\" id=\"idpRole_");
                        out.print(i);
                        out.write("\" name=\"idpRole_");
                        out.print(i);
                        out.write("\" readonly=\"readonly\"/>\n");
                        out.write("                               \t</td>\n");
                        out.write(
                                "                                   <td><input style=\"width: 98%;\" class=\"roleMapSp\" type=\"text\" value=\"");
                        out.print(Encode.forHtmlAttribute(entry.getValue()));
                        out.write("\" id=\"spRole_");
                        out.print(i);
                        out.write("\" name=\"spRole_");
                        out.print(i);
                        out.write("\" readonly=\"readonly\"/></td>\n");
                        out.write("                                   <td>\n");
                        out.write("                                       <a title=\"");
                        if (_jspx_meth_fmt_005fmessage_005f36(_jspx_th_fmt_005fbundle_005f0,
                                _jspx_page_context))
                            return;
                        out.write("\"\n");
                        out.write(
                                "                                          onclick=\"deleteRoleMappingRow(this);return false;\"\n");
                        out.write("                                          href=\"#\"\n");
                        out.write("                                          class=\"icon-link\"\n");
                        out.write(
                                "                                          style=\"background-image: url(images/delete.gif)\">\n");
                        out.write("                                           ");
                        if (_jspx_meth_fmt_005fmessage_005f37(_jspx_th_fmt_005fbundle_005f0,
                                _jspx_page_context))
                            return;
                        out.write("\n");
                        out.write("                                       </a>\n");
                        out.write("                                   </td>\n");
                        out.write("                               </tr>\n");
                        out.write("                               ");
                    }
                    out.write("\n");
                    out.write("                              ");
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t</tbody>\n");
                out.write("                      </table>\n");
                out.write(
                        "\t\t\t\t\t<input type=\"hidden\" name=\"number_of_rolemappings\" id=\"number_of_rolemappings\" value=\"1\">\n");
                out.write("\t\t\t\t\t</div>\n");
                out.write("            </div>\n");
                out.write("\n");
                out.write(
                        "            <h2 id=\"app_authentication_head\"  class=\"sectionSeperator trigger active\">\t\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f38(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("            </h2>\n");
                out.write("            \n");
                out.write("            ");
                if (display != null && (display.equals("oauthapp") || display.equals("samlIssuer")
                        || display.equals("serviceName") || display.equals("kerberos"))) {
                    out.write("\n");
                    out.write(
                            "                  <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"inbound_auth_request_div\">\n");
                    out.write("            ");
                } else {
                    out.write("\n");
                    out.write(
                            "                  <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"inbound_auth_request_div\">           \n");
                    out.write("            ");
                }
                out.write("\n");
                out.write(
                        "            <h2 id=\"saml.config.head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f39(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("                ");
                if (appBean.getSAMLIssuer() != null) {
                    out.write("\n");
                    out.write(
                            "                \t<div class=\"enablelogo\"><img src=\"images/ok.png\"  width=\"16\" height=\"16\"></div>\n");
                    out.write("                ");
                }
                out.write("\n");
                out.write("            </h2>\n");
                out.write("            \n");
                out.write("           ");
                if (display != null && display.equals("samlIssuer")) {
                    out.write("            \n");
                    out.write(
                            "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"saml.config.div\">\n");
                    out.write("          ");
                } else {
                    out.write("\n");
                    out.write(
                            "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"saml.config.div\">          \n");
                    out.write("          ");
                }
                out.write("\n");
                out.write("                <table class=\"carbonFormTable\">\n");
                out.write("                    <tr>\n");
                out.write("                        <td class=\"leftCol-med labelField\">\n");
                out.write("                        ");

                if (appBean.getSAMLIssuer() == null) {

                    out.write("\n");
                    out.write(
                            "                            <a id=\"saml_link\" class=\"icon-link\" onclick=\"onSamlSsoClick()\">");
                    if (_jspx_meth_fmt_005fmessage_005f40(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</a>\n");
                    out.write("\t\t\t\t\t\t ");

                } else {

                    out.write("\n");
                    out.write("\t\t\t\t\t\t \t\t<div style=\"clear:both\"></div>\n");
                    out.write("\t\t\t\t\t\t\t \t<table class=\"styledLeft\" id=\"samlTable\">\n");
                    out.write("                                <thead><tr><th class=\"leftCol-big\">");
                    if (_jspx_meth_fmt_005fmessage_005f41(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th><th class=\"leftCol-big\">");
                    if (_jspx_meth_fmt_005fmessage_005f42(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th><th>");
                    if (_jspx_meth_fmt_005fmessage_005f43(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th></tr></thead>\n");
                    out.write("                                <tbody>\n");
                    out.write("                                <tr><td>");
                    out.print(Encode.forHtmlContent(appBean.getSAMLIssuer()));
                    out.write("</td>\n");
                    out.write("                                \t<td>\n");
                    out.write("                                \t\t");
                    if (attributeConsumingServiceIndex == null || attributeConsumingServiceIndex.isEmpty()) {
                        attributeConsumingServiceIndex = appBean.getAttributeConsumingServiceIndex();
                    }

                    if (attributeConsumingServiceIndex != null) {
                        out.write("\n");
                        out.write("                                \t\t\t\t");
                        out.print(Encode.forHtmlContent(attributeConsumingServiceIndex));
                        out.write("\n");
                        out.write("                                \t\t\t");
                    }
                    out.write("\n");
                    out.write("                                \t</td>\n");
                    out.write("                                \t\t<td style=\"white-space: nowrap;\">\n");
                    out.write(
                            "                                \t\t\t<a title=\"Edit Service Providers\" onclick=\"updateBeanAndRedirect('../sso-saml/add_service_provider.jsp?SPAction=editServiceProvider&issuer=");
                    out.print(Encode.forUriComponent(appBean.getSAMLIssuer()));
                    out.write("&spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write(
                            "');\"  class=\"icon-link\" style=\"background-image: url(../admin/images/edit.gif)\">Edit</a>\n");
                    out.write(
                            "                                \t\t\t<a title=\"Delete Service Providers\" onclick=\"updateBeanAndRedirect('../sso-saml/remove_service_providers.jsp?issuer=");
                    out.print(Encode.forUriComponent(appBean.getSAMLIssuer()));
                    out.write("&spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write(
                            "');\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a>\n");
                    out.write("                                \t\t</td>\n");
                    out.write("                                \t</tr>\n");
                    out.write("                                </tbody>\n");
                    out.write("                                </table>\t\t\n");
                    out.write("\t\t\t\t\t\t ");

                }

                out.write("\n");
                out.write("\t\t\t\t\t\t\t<div style=\"clear:both\"></div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    </table>\n");
                out.write("                    \n");
                out.write("                    </div>\n");
                out.write(
                        "            <h2 id=\"oauth.config.head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f44(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("                ");
                if (appBean.getOIDCClientId() != null) {
                    out.write("\n");
                    out.write(
                            "                \t<div class=\"enablelogo\"><img src=\"images/ok.png\"  width=\"16\" height=\"16\"></div>\n");
                    out.write("                ");
                }
                out.write("\n");
                out.write("            </h2>\n");
                out.write("            ");
                if (display != null && display.equals("oauthapp")) {
                    out.write("                        \n");
                    out.write(
                            "                <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"oauth.config.div\">\n");
                    out.write("            ");
                } else {
                    out.write("\n");
                    out.write(
                            "                <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"oauth.config.div\">\n");
                    out.write("            ");
                }
                out.write("\n");
                out.write("                <table class=\"carbonFormTable\">\n");
                out.write("                    <tr>\n");
                out.write("                    \t<td>\n");
                out.write("\t                    \t");

                if (appBean.getOIDCClientId() == null) {

                    out.write("\n");
                    out.write(
                            "\t\t\t                        <a id=\"oauth_link\" class=\"icon-link\" onclick=\"onOauthClick()\">\n");
                    out.write("\t\t\t\t\t\t\t\t\t");
                    if (_jspx_meth_fmt_005fmessage_005f45(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</a>\n");
                    out.write("\t\t\t\t\t\t\t ");

                } else {

                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t <div style=\"clear:both\"></div>\n");
                    out.write("\t\t\t\t\t\t\t <table class=\"styledLeft\" id=\"samlTable\">\n");
                    out.write("                                <thead>\n");
                    out.write("                                \t<tr>\n");
                    out.write(
                            "                                \t\t<th class=\"leftCol-big\">OAuth Client Key</th>\n");
                    out.write(
                            "                                \t\t<th class=\"leftCol-big\">OAuth Client Secret</th>\n");
                    out.write("                                \t\t<th>");
                    if (_jspx_meth_fmt_005fmessage_005f46(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th>\n");
                    out.write("                                \t</tr>\n");
                    out.write("                                </thead>\n");
                    out.write("                                <tbody>\n");
                    out.write("                                <tr>\n");
                    out.write("                                \t<td>");
                    out.print(Encode.forHtmlContent(appBean.getOIDCClientId()));
                    out.write("</td>\n");
                    out.write("                                \t<td>\n");
                    out.write("                                \t\t");
                    if (oauthConsumerSecret == null || oauthConsumerSecret.isEmpty()) {
                        oauthConsumerSecret = appBean.getOauthConsumerSecret();
                    }
                    if (oauthConsumerSecret != null) {
                        out.write("\n");
                        out.write("                                \t\t\t\t<div>\n");
                        out.write(
                                "                                \t\t\t\t\t<input style=\"border: none; background: white;\" type=\"password\" id=\"oauthConsumerSecret\" name=\"oauthConsumerSecret\" value=\"");
                        out.print(Encode.forHtmlAttribute(oauthConsumerSecret));
                        out.write("\"readonly=\"readonly\">\n");
                        out.write("                                \t\t\t\t\t<span style=\"float: right;\">\n");
                        out.write(
                                "                                \t\t\t\t\t\t<a style=\"margin-top: 5px;\" class=\"showHideBtn\" onclick=\"showHidePassword(this, 'oauthConsumerSecret')\">Show</a>\n");
                        out.write("                                \t\t\t\t\t</span>\n");
                        out.write("                                \t\t\t\t</div>\n");
                        out.write("                                \t\t  ");
                    }
                    out.write("\n");
                    out.write("                                \t</td>\n");
                    out.write("                                \t\t<td style=\"white-space: nowrap;\">\n");
                    out.write(
                            "                                \t\t\t<a title=\"Edit Service Providers\" onclick=\"updateBeanAndRedirect('../oauth/edit.jsp?appName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write(
                            "');\"  class=\"icon-link\" style=\"background-image: url(../admin/images/edit.gif)\">Edit</a>\n");
                    out.write(
                            "                                \t\t\t<a title=\"Delete Service Providers\" onclick=\"updateBeanAndRedirect('../oauth/remove-app.jsp?consumerkey=");
                    out.print(Encode.forUriComponent(appBean.getOIDCClientId()));
                    out.write("&appName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write("&spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write(
                            "');\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a>\n");
                    out.write("                                \t\t</td>\n");
                    out.write("                                \t</tr>\n");
                    out.write("                                </tbody>\n");
                    out.write("                                </table>\n");
                    out.write("\t\t\t\t\t\t\t ");

                }

                out.write("\n");
                out.write("\t\t\t\t\t\t\t<div style=\"clear:both\"></div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    </table>\n");
                out.write("                    </div>\n");
                out.write("\n");
                out.write("\n");
                out.write(
                        "\t\t\t\t<h2 id=\"openid.config.head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("\t\t\t\t\t<a href=\"#\">OpenID Configuration</a>\n");
                out.write(
                        "\t\t\t\t\t<div class=\"enablelogo\"><img src=\"images/ok.png\"  width=\"16\" height=\"16\"></div>\n");
                out.write("\t\t\t\t</h2>\n");
                out.write(
                        "\t\t\t\t<div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"openid.config.div\">\n");
                out.write("\t\t\t\t\t<table class=\"carbonFormTable\">\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t<tr>\n");
                out.write("\t\t\t\t\t\t\t<td style=\"width:15%\" class=\"leftCol-med labelField\">\n");
                out.write("\t\t\t\t\t\t\t\t");
                if (_jspx_meth_fmt_005fmessage_005f47(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":\n");
                out.write("\t\t\t\t\t\t\t</td>\n");
                out.write("\t\t\t\t\t\t\t<td>\n");
                out.write("\t\t\t\t\t\t\t\t");

                if (appBean.getOpenIDRealm() != null) {

                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t<input style=\"width:50%\" id=\"openidRealm\" name=\"openidRealm\" type=\"text\" value=\"");
                    out.print(Encode.forHtmlAttribute(appBean.getOpenIDRealm()));
                    out.write("\" autofocus/>\n");
                    out.write("\t\t\t\t\t\t\t\t");
                } else {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t<input style=\"width:50%\" id=\"openidRealm\" name=\"openidRealm\" type=\"text\" value=\"\" autofocus/>\n");
                    out.write("\t\t\t\t\t\t\t\t");
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t\t\t<div class=\"sectionHelp\">\n");
                out.write("\t\t\t\t\t\t\t\t\t");
                if (_jspx_meth_fmt_005fmessage_005f48(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("\t\t\t\t\t\t\t\t</div>\n");
                out.write("\t\t\t\t\t\t\t</td>\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t</tr>\n");
                out.write("\n");
                out.write("\t\t\t\t\t</table>\n");
                out.write("\t\t\t\t</div>\n");
                out.write("\n");
                out.write("\n");
                out.write(
                        "\t\t\t\t<h2 id=\"passive.sts.config.head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                <a href=\"#\">WS-Federation (Passive) Configuration</a>\n");
                out.write(
                        "                <div class=\"enablelogo\"><img src=\"images/ok.png\"  width=\"16\" height=\"16\"></div>\n");
                out.write("            </h2>\n");
                out.write(
                        "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"passive.config.div\">\n");
                out.write("                  <table class=\"carbonFormTable\">\n");
                out.write("                    \n");
                out.write("                    <tr>\n");
                out.write("                    \t<td style=\"width:15%\" class=\"leftCol-med labelField\">\n");
                out.write("                    \t\t");
                if (_jspx_meth_fmt_005fmessage_005f49(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":\n");
                out.write("                    \t</td>\n");
                out.write("                    \t<td>\n");
                out.write("                    \t    ");

                if (appBean.getPassiveSTSRealm() != null) {

                    out.write("\t                    \n");
                    out.write(
                            "                            <input style=\"width:50%\" id=\"passiveSTSRealm\" name=\"passiveSTSRealm\" type=\"text\" value=\"");
                    out.print(Encode.forHtmlAttribute(appBean.getPassiveSTSRealm()));
                    out.write("\" autofocus/>\n");
                    out.write("                            ");
                } else {
                    out.write("\n");
                    out.write(
                            "                            <input style=\"width:50%\" id=\"passiveSTSRealm\" name=\"passiveSTSRealm\" type=\"text\" value=\"\" autofocus/>\n");
                    out.write("                            ");
                }
                out.write("\n");
                out.write("                          <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f50(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                        \n");
                out.write("                    </tr>\n");
                out.write("                      <tr>\n");
                out.write(
                        "                          <td style=\"width:15%\" class=\"leftCol-med labelField\">\n");
                out.write("                              ");
                if (_jspx_meth_fmt_005fmessage_005f51(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":\n");
                out.write("                          </td>\n");
                out.write("                          <td>\n");
                out.write("                              ");

                if (appBean.getPassiveSTSWReply() != null) {

                    out.write("\n");
                    out.write(
                            "                              <input style=\"width:50%\" id=\"passiveSTSWReply\" name=\"passiveSTSWReply\" type=\"text\" value=\"");
                    out.print(Encode.forHtmlAttribute(appBean.getPassiveSTSWReply()));
                    out.write("\" autofocus/>\n");
                    out.write("                              ");
                } else {
                    out.write("\n");
                    out.write(
                            "                              <input style=\"width:50%\" id=\"passiveSTSWReply\" name=\"passiveSTSWReply\" type=\"text\" value=\"\" autofocus/>\n");
                    out.write("                              ");
                }
                out.write("\n");
                out.write("                              <div class=\"sectionHelp\">\n");
                out.write("                                  ");
                if (_jspx_meth_fmt_005fmessage_005f52(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                              </div>\n");
                out.write("                          </td>\n");
                out.write("\n");
                out.write("                      </tr>\n");
                out.write("                   \n");
                out.write("                  </table>\n");
                out.write("            </div>\n");
                out.write("\n");
                out.write(
                        "\t\t\t\t<h2 id=\"wst.config.head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("\t\t\t\t\t<a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f53(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("\t\t\t\t\t");
                if (appBean.getWstrustSP() != null) {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t<div class=\"enablelogo\"><img src=\"images/ok.png\"  width=\"16\" height=\"16\"></div>\n");
                    out.write("\t\t\t\t\t");
                }
                out.write("\n");
                out.write("\t\t\t\t</h2>\n");
                out.write("\t\t\t\t\t\t");
                if (display != null && display.equals("serviceName")) {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t<div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"wst.config.div\">\n");
                    out.write("\t\t\t\t\t");
                } else {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t<div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"wst.config.div\">\n");
                    out.write("\t\t\t\t\t\t");
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t<table class=\"carbonFormTable\">\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t\t<tr>\n");
                out.write("\t\t\t\t\t\t\t\t<td>\n");
                out.write("\t\t\t\t\t\t\t\t\t");

                if (appBean.getWstrustSP() == null) {

                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t<a id=\"sts_link\" class=\"icon-link\" onclick=\"onSTSClick()\">\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t");
                    if (_jspx_meth_fmt_005fmessage_005f54(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</a>\n");
                    out.write("\t\t\t\t\t\t\t\t\t");

                } else {

                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t\t<div style=\"clear:both\"></div>\n");
                    out.write("\t\t\t\t\t\t\t\t\t<table class=\"styledLeft\" id=\"samlTable\">\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t<thead><tr><th class=\"leftCol-med\">Audience</th><th>");
                    if (_jspx_meth_fmt_005fmessage_005f55(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th></tr></thead>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t<tbody>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t<tr>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t<td>");
                    out.print(Encode.forHtmlContent(appBean.getWstrustSP()));
                    out.write("</td>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t<td style=\"white-space: nowrap;\">\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t\t\t\t<a title=\"Edit Audience\" onclick=\"updateBeanAndRedirect('../generic-sts/sts.jsp?spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write("&&spAudience=");
                    out.print(Encode.forUriComponent(appBean.getWstrustSP()));
                    out.write(
                            "&spAction=spEdit');\"  class=\"icon-link\" style=\"background-image: url(../admin/images/edit.gif)\">Edit</a>\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t\t\t\t<a title=\"Delete Audience\" onclick=\"updateBeanAndRedirect('../generic-sts/remove-trusted-service.jsp?action=delete&spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write("&endpointaddrs=");
                    out.print(Encode.forUriComponent(appBean.getWstrustSP()));
                    out.write(
                            "');\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t</td>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t</tr>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t</tbody>\n");
                    out.write("\t\t\t\t\t\t\t\t\t</table>\n");
                    out.write("\t\t\t\t\t\t\t\t\t");

                }

                out.write("\n");
                out.write("\t\t\t\t\t\t\t\t\t<div style=\"clear:both\"></div>\n");
                out.write("\t\t\t\t\t\t\t\t</td>\n");
                out.write("\t\t\t\t\t\t\t</tr>\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t</table>\n");
                out.write("\t\t\t\t\t</div>\n");
                out.write("\n");
                out.write(
                        "\t\t\t\t   <h2 id=\"kerberos.kdc.head\" class=\"sectionSeperator trigger active\"\n");
                out.write("\t\t\t\t\t   style=\"background-color: beige;\">\n");
                out.write("\t\t\t\t\t   <a href=\"#\">Kerberos KDC</a>\n");
                out.write("\n");
                out.write("\t\t\t\t\t  ");
                if (appBean.getKerberosServiceName() != null) {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t   \t\t<div class=\"enablelogo\"><img src=\"images/ok.png\"  width=\"16\" height=\"16\"></div>\n");
                    out.write("\t\t\t\t\t   ");
                }
                out.write("\n");
                out.write("\t\t\t\t   </h2>\n");
                out.write("\n");
                out.write("\t\t\t\t\t");
                if (display != null && display.equals("kerberos")) {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t\t<div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"kerberos.config.div\">\n");
                    out.write("\t\t\t\t\t");
                } else {
                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t\t<div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\"\n");
                    out.write("\t\t\t\t\t\t\t\t id=\"kerberos.config.div\">\n");
                    out.write("\t\t\t\t\t");
                }
                out.write("\n");
                out.write("\n");
                out.write("\t\t\t\t\t   <table class=\"carbonFormTable\">\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t   <tr>\n");
                out.write("\t\t\t\t\t\t\t   <td>\n");
                out.write("\t\t\t\t\t\t\t\t   ");

                if (appBean.getKerberosServiceName() == null) {

                    out.write("\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t   <a id=\"kerberos_link\" class=\"icon-link\" onclick=\"onKerberosClick()\">");
                    if (_jspx_meth_fmt_005fmessage_005f56(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</a>\n");
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t   ");
                } else {
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t   <div style=\"clear:both\"></div>\n");
                    out.write("\t\t\t\t\t\t\t\t   <table class=\"styledLeft\" id=\"kerberosTable\">\n");
                    out.write("\t\t\t\t\t\t\t\t\t   <thead>\n");
                    out.write("\t\t\t\t\t\t\t\t\t   <tr>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t   <th class=\"leftCol-big\">");
                    if (_jspx_meth_fmt_005fmessage_005f57(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t   <th>");
                    if (_jspx_meth_fmt_005fmessage_005f58(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</th>\n");
                    out.write("\t\t\t\t\t\t\t\t\t   </tr>\n");
                    out.write("\t\t\t\t\t\t\t\t\t   </thead>\n");
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t\t   <tbody>\n");
                    out.write("\t\t\t\t\t\t\t\t\t   <tr>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t   <td>");
                    out.print(Encode.forHtmlContent(appBean.getKerberosServiceName()));
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t   </td>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t   <td style=\"white-space: nowrap;\">\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t   <a title=\"Change Password\"\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t\t\t\t  onclick=\"updateBeanAndRedirect('../servicestore/change-passwd.jsp?SPAction=changePWr&spnName=");
                    out.print(Encode.forUriComponent(appBean.getKerberosServiceName()));
                    out.write("&spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write("');\"\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t\t  class=\"icon-link\"\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t\t\t\t  style=\"background-image: url(../admin/images/edit.gif)\">Change Password</a>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t   <a title=\"Delete\"\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t\t\t\t  onclick=\"updateBeanAndRedirect('../servicestore/delete-finish.jsp?SPAction=delete&spnName=");
                    out.print(Encode.forUriComponent(appBean.getKerberosServiceName()));
                    out.write("&spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write("');\"\n");
                    out.write(
                            "\t\t\t\t\t\t\t\t\t\t\t\t  class=\"icon-link\" style=\"background-image: url(images/delete.gif)\">\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t\t\t   Delete </a>\n");
                    out.write("\t\t\t\t\t\t\t\t\t\t   </td>\n");
                    out.write("\t\t\t\t\t\t\t\t\t   </tr>\n");
                    out.write("\t\t\t\t\t\t\t\t\t   </tbody>\n");
                    out.write("\t\t\t\t\t\t\t\t   </table>\n");
                    out.write("\t\t\t\t\t\t\t\t   ");

                }

                out.write("\n");
                out.write("\t\t\t\t\t\t\t   </td>\n");
                out.write("\n");
                out.write("\t\t\t\t\t\t   </tr>\n");
                out.write("\n");
                out.write("\t\t\t\t\t   </table>\n");
                out.write("\t\t\t\t   </div>\n");
                out.write("\n");
                out.write("                        ");

                List<String> standardInboundAuthTypes = new ArrayList<String>();
                standardInboundAuthTypes = new ArrayList<String>();
                standardInboundAuthTypes.add("oauth2");
                standardInboundAuthTypes.add("wstrust");
                standardInboundAuthTypes.add("samlsso");
                standardInboundAuthTypes.add("openid");
                standardInboundAuthTypes.add("passivests");

                if (!CollectionUtils.isEmpty(appBean.getInboundAuthenticators())) {
                    List<InboundAuthenticationRequestConfig> customAuthenticators = appBean
                            .getInboundAuthenticators();
                    for (InboundAuthenticationRequestConfig customAuthenticator : customAuthenticators) {
                        if (!standardInboundAuthTypes.contains(customAuthenticator.getInboundAuthType())) {
                            String type = customAuthenticator.getInboundAuthType();
                            String friendlyName = customAuthenticator.getFriendlyName();

                            out.write("\n");
                            out.write("\n");
                            out.write(
                                    "                        <h2 id=\"openid.config.head\" class=\"sectionSeperator trigger active\"\n");
                            out.write("                            style=\"background-color: beige;\">\n");
                            out.write("                            <a href=\"#\">");
                            out.print(friendlyName);
                            out.write("\n");
                            out.write("                            </a>\n");
                            out.write("\n");
                            out.write(
                                    "                            <div class=\"enablelogo\"><img src=\"images/ok.png\" width=\"16\" height=\"16\"></div>\n");
                            out.write("                        </h2>\n");
                            out.write(
                                    "                        <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\"\n");
                            out.write("                             id=\"openid.config.div\">\n");
                            out.write("                            <table class=\"carbonFormTable\">\n");
                            out.write("                                ");

                            Property[] properties = customAuthenticator.getProperties();
                            for (Property prop : properties) {
                                String propName = "custom_auth_prop_name_" + type + "_" + prop.getName();

                                out.write("\n");
                                out.write("\n");
                                out.write("                                <tr>\n");
                                out.write(
                                        "                                    <td style=\"width:15%\" class=\"leftCol-med labelField\">\n");
                                out.write("                                        ");
                                out.print(prop.getDisplayName() + ":");
                                out.write("\n");
                                out.write("                                    </td>\n");
                                out.write("                                    <td>\n");
                                out.write("                                        ");

                                if (prop.getValue() != null) {

                                    out.write("\n");
                                    out.write(
                                            "                                        <input style=\"width:50%\" id=\"");
                                    out.print(propName);
                                    out.write("\" name=\"");
                                    out.print(propName);
                                    out.write("\" type=\"text\"\n");
                                    out.write("                                               value=\"");
                                    out.print(prop.getValue());
                                    out.write("\" autofocus/>\n");
                                    out.write("                                        ");
                                } else {
                                    out.write("\n");
                                    out.write(
                                            "                                        <input style=\"width:50%\" id=\"");
                                    out.print(propName);
                                    out.write("\" name=\"");
                                    out.print(propName);
                                    out.write("\" type=\"text\"\n");
                                    out.write("                                               autofocus/>\n");
                                    out.write("                                        ");
                                }
                                out.write("\n");
                                out.write("\n");
                                out.write("                                    </td>\n");
                                out.write("\n");
                                out.write("                                </tr>\n");
                                out.write("                                ");

                            }

                            out.write("\n");
                            out.write("\n");
                            out.write("                            </table>\n");
                            out.write("                        </div>\n");
                            out.write("                        ");

                        }
                    }
                }

                out.write("\n");
                out.write("\n");
                out.write("\t\t\t   </div>\n");
                out.write("            \n");
                out.write(
                        "             <h2 id=\"app_authentication_advance_head\"  class=\"sectionSeperator trigger active\">\n");
                out.write("               \t\t<a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f59(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("           \t\t  </h2>\n");
                out.write("           \t\t  ");
                if (display != null && "auth_config".equals(display)) {
                    out.write("\n");
                    out.write(
                            "           \t\t    <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:block;\" id=\"advanceAuthnConfRow\">\n");
                    out.write("           \t\t  ");
                } else {
                    out.write("\n");
                    out.write(
                            "                    <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;display:none;\" id=\"advanceAuthnConfRow\">\n");
                    out.write("                   ");
                }
                out.write("\n");
                out.write("                   \t<table class=\"carbonFormTable\">\n");
                out.write("                    \t<tr>\n");
                out.write("                    \t\t<td class=\"leftCol-med labelField\">");
                if (_jspx_meth_fmt_005fmessage_005f60(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write(":<span class=\"required\">*</span>\n");
                out.write("                    \t\t</td>\n");
                out.write("                        \t<td class=\"leftCol-med\">\n");
                out.write("                        \t");
                if (ApplicationBean.AUTH_TYPE_DEFAULT.equals(appBean.getAuthenticationType())) {
                    out.write("\n");
                    out.write(
                            "                        \t\t<input type=\"radio\" id=\"default\" name=\"auth_type\" value=\"default\" checked><label for=\"default\" style=\"cursor: pointer;\">");
                    if (_jspx_meth_fmt_005fmessage_005f61(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                        \t\t");
                } else {
                    out.write("\n");
                    out.write(
                            "                        \t\t<input type=\"radio\" id=\"default\" name=\"auth_type\" value=\"default\" ><label for=\"default\" style=\"cursor: pointer;\">");
                    if (_jspx_meth_fmt_005fmessage_005f62(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                        \t");
                }
                out.write("\n");
                out.write("                        \t</td>\n");
                out.write("                        \t<td/>\n");
                out.write("                    \t</tr>   \n");
                out.write("                  \t\t  \t<tr>\n");
                out.write(
                        "                    \t\t<td style=\"width:15%\" class=\"leftCol-med labelField\"/>\n");
                out.write("                        \t<td>\n");
                out.write("                        \t");
                if (ApplicationBean.AUTH_TYPE_LOCAL.equals(appBean.getAuthenticationType())) {
                    out.write("\n");
                    out.write(
                            "                        \t\t<input type=\"radio\" id=\"local\" name=\"auth_type\" value=\"local\" checked><label for=\"local\" style=\"cursor: pointer;\">");
                    if (_jspx_meth_fmt_005fmessage_005f63(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                        \t\t");
                } else {
                    out.write("\n");
                    out.write(
                            "                        \t\t<input type=\"radio\" id=\"local\" name=\"auth_type\" value=\"local\"><label for=\"local\" style=\"cursor: pointer;\">");
                    if (_jspx_meth_fmt_005fmessage_005f64(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                        \t\t");
                }
                out.write("\n");
                out.write("                        \t</td>\n");
                out.write("                        \t<td>\n");
                out.write(
                        "                        \t\t\t<select name=\"local_authenticator\" id=\"local_authenticator\">\n");
                out.write("                        \t\t\t");

                if (appBean.getLocalAuthenticatorConfigs() != null) {
                    LocalAuthenticatorConfig[] localAuthenticatorConfigs = appBean
                            .getLocalAuthenticatorConfigs();
                    for (LocalAuthenticatorConfig authenticator : localAuthenticatorConfigs) {

                        out.write("\n");
                        out.write("\t                        \t\t\t\t");
                        if (authenticator.getName().equals(
                                appBean.getStepZeroAuthenticatorName(ApplicationBean.AUTH_TYPE_LOCAL))) {
                            out.write("\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                            out.print(Encode.forHtmlAttribute(authenticator.getName()));
                            out.write("\" selected>");
                            out.print(Encode.forHtmlContent(authenticator.getDisplayName()));
                            out.write("</option>\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t");
                        } else {
                            out.write("\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                            out.print(Encode.forHtmlAttribute(authenticator.getName()));
                            out.write('"');
                            out.write('>');
                            out.print(Encode.forHtmlContent(authenticator.getDisplayName()));
                            out.write("</option>\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t");
                        }
                        out.write("\n");
                        out.write("\t\t\t\t\t\t\t\t\t\t");
                    }
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t\t");
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t\t\t\t</select>\n");
                out.write("                        \t</td>\n");
                out.write("                    \t</tr>   \n");
                out.write("                    \t");

                if (appBean.getEnabledFederatedIdentityProviders() != null
                        && appBean.getEnabledFederatedIdentityProviders().size() > 0) {
                    out.write("\n");
                    out.write("                    \t<tr>\n");
                    out.write("                    \t\t<td class=\"leftCol-med labelField\"/>\n");
                    out.write("                        \t<td>\n");
                    out.write("                        \t");
                    if (ApplicationBean.AUTH_TYPE_FEDERATED.equals(appBean.getAuthenticationType())) {
                        out.write("\n");
                        out.write(
                                "                        \t\t<input type=\"radio\" id=\"federated\" name=\"auth_type\" value=\"federated\" checked><label for=\"federated\" style=\"cursor: pointer;\">");
                        if (_jspx_meth_fmt_005fmessage_005f65(_jspx_th_fmt_005fbundle_005f0,
                                _jspx_page_context))
                            return;
                        out.write("</label>\n");
                        out.write("                        \t");
                    } else {
                        out.write("\n");
                        out.write(
                                "                        \t\t<input type=\"radio\" id=\"federated\" name=\"auth_type\" value=\"federated\"><label for=\"federated\" style=\"cursor: pointer;\">");
                        if (_jspx_meth_fmt_005fmessage_005f66(_jspx_th_fmt_005fbundle_005f0,
                                _jspx_page_context))
                            return;
                        out.write("</label>\n");
                        out.write("                        \t");
                    }
                    out.write("\n");
                    out.write("                        \t</td>\n");
                    out.write("                        \t<td>\n");
                    out.write("                        \t\t\t<select name=\"fed_idp\" id=\"fed_idp\">\n");
                    out.write("                        \t\t\t");
                    List<IdentityProvider> idps = appBean.getEnabledFederatedIdentityProviders();
                    String selectedIdP = appBean
                            .getStepZeroAuthenticatorName(ApplicationBean.AUTH_TYPE_FEDERATED);
                    boolean isSelectedIdPUsed = false;
                    for (IdentityProvider idp : idps) {
                        if (selectedIdP != null && idp.getIdentityProviderName().equals(selectedIdP)) {
                            isSelectedIdPUsed = true;

                            out.write("\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                            out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                            out.write("\" selected>");
                            out.print(Encode.forHtmlContent(idp.getIdentityProviderName()));
                            out.write("</option>\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t");
                        } else {
                            out.write("\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t\t<option value=\"");
                            out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                            out.write('"');
                            out.write('>');
                            out.print(Encode.forHtmlContent(idp.getIdentityProviderName()));
                            out.write("</option>\n");
                            out.write("\t\t\t\t\t\t\t\t\t\t");
                        }
                        out.write("\n");
                        out.write("\t\t\t\t\t\t\t\t\t");
                    }
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t\t\t</select>\n");
                    out.write("                        \t</td>\n");
                    out.write("                    \t</tr> \n");
                    out.write("                    \t");
                } else {
                    out.write("\n");
                    out.write("                    \t<tr>\n");
                    out.write("                    \t\t<td class=\"leftCol-med labelField\"/>\n");
                    out.write("                    \t\t<td>\n");
                    out.write(
                            "                    \t\t\t<input type=\"radio\" id=\"disabledFederated\" name=\"auth_type\" value=\"federated\" disabled><label for=\"disabledFederated\">");
                    if (_jspx_meth_fmt_005fmessage_005f67(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                    \t\t</td>\n");
                    out.write("                    \t\t<td></td>\n");
                    out.write("                    \t</tr>\n");
                    out.write("                    \t");
                }
                out.write("\n");
                out.write("                    \t<tr>\n");
                out.write("                    \t\t<td class=\"leftCol-med labelField\"/>\n");
                out.write("                        \t<td>\n");
                out.write("                        \t");
                if (ApplicationBean.AUTH_TYPE_FLOW.equals(appBean.getAuthenticationType())) {
                    out.write("\n");
                    out.write(
                            "                        \t\t<input type=\"radio\" id=\"advanced\" name=\"auth_type\" value=\"flow\" onclick=\"updateBeanAndRedirect('configure-authentication-flow.jsp?spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write(
                            "');\" checked><label style=\"cursor: pointer; color: #2F7ABD;\" for=\"advanced\">");
                    if (_jspx_meth_fmt_005fmessage_005f68(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                        \t");
                } else {
                    out.write("\n");
                    out.write(
                            "                        \t\t<input type=\"radio\" id=\"advanced\" name=\"auth_type\" value=\"flow\" onclick=\"updateBeanAndRedirect('configure-authentication-flow.jsp?spName=");
                    out.print(Encode.forUriComponent(spName));
                    out.write("')\"><label style=\"cursor: pointer; color: #2F7ABD;\" for=\"advanced\">");
                    if (_jspx_meth_fmt_005fmessage_005f69(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                        return;
                    out.write("</label>\n");
                    out.write("                        \t\t");
                }
                out.write("\n");
                out.write("                        \t</td>\n");
                out.write("                    \t</tr>               \n");
                out.write("                  </table>\n");
                out.write("                  <table class=\"carbonFormTable\" style=\"padding-top: 5px;\">\n");
                out.write("                   \t\t<tr>\n");
                out.write("\t\t\t\t\t\t\t<td class=\"leftCol-med\">\n");
                out.write(
                        "                                <input type=\"checkbox\"  id=\"always_send_local_subject_id\" name=\"always_send_local_subject_id\" ");
                out.print(appBean.isAlwaysSendMappedLocalSubjectId() ? "checked" : "");
                out.write("/><label for=\"always_send_local_subject_id\">");
                if (_jspx_meth_fmt_005fmessage_005f70(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("                        \t</td>\n");
                out.write("                    \t</tr>\n");
                out.write("                    \t<tr>\n");
                out.write("\t\t\t\t\t\t\t<td class=\"leftCol-med\">\n");
                out.write(
                        "                                <input type=\"checkbox\"  id=\"always_send_auth_list_of_idps\" name=\"always_send_auth_list_of_idps\" ");
                out.print(appBean.isAlwaysSendBackAuthenticatedListOfIdPs() ? "checked" : "");
                out.write("/><label for=\"always_send_auth_list_of_idps\">");
                if (_jspx_meth_fmt_005fmessage_005f71(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("                        \t</td>\n");
                out.write("                    \t</tr>\n");
                out.write("\t\t\t\t\t  <tr>\n");
                out.write("\t\t\t\t\t\t  <td class=\"leftCol-med\">\n");
                out.write(
                        "\t\t\t\t\t\t\t  <input type=\"checkbox\"  id=\"use_tenant_domain_in_local_subject_identifier\"\n");
                out.write("\t\t\t\t\t\t\t\t\t name=\"use_tenant_domain_in_local_subject_identifier\" ");
                out.print(appBean.isUseTenantDomainInLocalSubjectIdentifier() ? "checked" : "");
                out.write("/><label for=\"use_tenant_domain_in_local_subject_identifier\">");
                if (_jspx_meth_fmt_005fmessage_005f72(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("\t\t\t\t\t\t  </td>\n");
                out.write("\t\t\t\t\t  </tr>\n");
                out.write("\t\t\t\t\t  <tr>\n");
                out.write("\t\t\t\t\t\t  <td class=\"leftCol-med\">\n");
                out.write(
                        "\t\t\t\t\t\t\t  <input type=\"checkbox\"  id=\"use_userstore_domain_in_local_subject_identifier\"\n");
                out.write("\t\t\t\t\t\t\t\t\t name=\"use_userstore_domain_in_local_subject_identifier\" ");
                out.print(appBean.isUseUserstoreDomainInLocalSubjectIdentifier() ? "checked" : "");
                out.write("/><label\n");
                out.write("\t\t\t\t\t\t\t\t  for=\"use_userstore_domain_in_local_subject_identifier\">");
                if (_jspx_meth_fmt_005fmessage_005f73(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</label>\n");
                out.write("\t\t\t\t\t\t  </td>\n");
                out.write("\t\t\t\t\t  </tr>\n");
                out.write("                    </table>\n");
                out.write("\n");
                out.write("                  \n");
                out.write(
                        "                   <h2 id=\"req_path_head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f74(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("            </h2>\n");
                out.write(
                        "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"ReqPathAuth\">\n");
                out.write(
                        "                    <table class=\"styledLeft\" width=\"100%\" id=\"req_path_auth_table\">\n");
                out.write("                    \t<thead>\n");
                out.write("                    \t<tr>\n");
                out.write("                    \t\t<td>\n");
                out.write(
                        "                    \t\t\t<select name=\"reqPathAuthType\" style=\"float: left; min-width: 150px;font-size:13px;\">");
                out.print(requestPathAuthTypes.toString());
                out.write("</select>\n");
                out.write(
                        "                    \t\t\t<a id=\"reqPathAuthenticatorAddLink\" class=\"icon-link\" style=\"background-image:url(images/add.gif);\">Add</a>\n");
                out.write("                    \t\t\t<div style=\"clear:both\"></div>\n");
                out.write("                           \t\t<div class=\"sectionHelp\">\n");
                out.write("                                \t");
                if (_jspx_meth_fmt_005fmessage_005f75(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            \t</div>\n");
                out.write("                    \t\t</td>\n");
                out.write("                    \t</tr>\n");
                out.write("                    \t</thead>\n");
                out.write("                    \t\n");
                out.write("                    \t");

                if (appBean.getServiceProvider().getRequestPathAuthenticatorConfigs() != null
                        && appBean.getServiceProvider().getRequestPathAuthenticatorConfigs().length > 0) {
                    int x = 0;
                    for (RequestPathAuthenticatorConfig reqAth : appBean.getServiceProvider()
                            .getRequestPathAuthenticatorConfigs()) {
                        if (reqAth != null) {

                            out.write("\n");
                            out.write("                    \t\t\t <tr>\n");
                            out.write("                    \t\t\t <td>\n");
                            out.write(
                                    "                    \t\t\t \t<input name=\"req_path_auth\" id=\"req_path_auth\" type=\"hidden\" value=\"");
                            out.print(Encode.forHtmlAttribute(reqAth.getName()));
                            out.write("\" />\n");
                            out.write("                    \t\t\t \t<input name=\"req_path_auth_");
                            out.print(Encode.forHtmlAttribute(reqAth.getName()));
                            out.write("\" id=\"req_path_auth_");
                            out.print(Encode.forHtmlAttribute(reqAth.getName()));
                            out.write("\" type=\"hidden\" value=\"");
                            out.print(Encode.forHtmlAttribute(reqAth.getName()));
                            out.write("\" />\n");
                            out.write("                    \t\t\t \t\n");
                            out.write("                    \t\t\t \t");
                            out.print(Encode.forHtmlContent(reqAth.getName()));
                            out.write("\n");
                            out.write("                    \t\t\t </td>\n");
                            out.write("                    \t\t\t <td class=\"leftCol-small\" >\n");
                            out.write(
                                    "                    \t\t\t \t<a onclick=\"deleteReqPathRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a>\n");
                            out.write("                    \t\t\t </td>\n");
                            out.write("                    \t\t\t </tr>\t      \t\t\t \n");
                            out.write("                    \t\t\t ");

                        }
                    }
                }

                out.write("\n");
                out.write("                    </table> \n");
                out.write("            </div>\n");
                out.write("                  \n");
                out.write("            </div>\n");
                out.write("            \n");
                out.write(
                        "            <h2 id=\"inbound_provisioning_head\" class=\"sectionSeperator trigger active\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f76(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("            </h2>\n");
                out.write(
                        "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"inboundProvisioning\">\n");
                out.write("            \n");
                out.write(
                        "             <h2 id=\"scim-inbound_provisioning_head\" class=\"sectionSeperator trigger active\" style=\"background-color: beige;\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f77(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("             </h2>\n");
                out.write(
                        "                <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"scim-inbound-provisioning-div\">\n");
                out.write("                <table class=\"carbonFormTable\">\n");
                out.write(
                        "                  <tr><td>Service provider based SCIM provisioning is protected via OAuth 2.0. \n");
                out.write(
                        "                  Your service provider must have a valid OAuth 2.0 client key and a client secret to invoke the SCIM API.\n");
                out.write(
                        "                  To create OAuth 2.0 key/secret : Inbound Authentication Configuration -> OAuth/OpenID Connect Configuration.<br/>\n");
                out.write("                  </td></tr>\n");
                out.write("                   <tr>\n");
                out.write("                        <td >\n");
                out.write(
                        "                          <select style=\"min-width: 250px;\" id=\"scim-inbound-userstore\" name=\"scim-inbound-userstore\" ");
                out.print(appBean.getServiceProvider().getInboundProvisioningConfig().getDumbMode() ? "disabled"
                        : "");
                out.write(">\n");
                out.write("                          \t\t<option value=\"\">---Select---</option>\n");
                out.write("                                ");

                if (userStoreDomains != null && userStoreDomains.length > 0) {
                    for (String userStoreDomain : userStoreDomains) {
                        if (userStoreDomain != null) {
                            if (appBean.getServiceProvider().getInboundProvisioningConfig() != null
                                    && appBean.getServiceProvider().getInboundProvisioningConfig()
                                            .getProvisioningUserStore() != null
                                    && userStoreDomain.equals(appBean.getServiceProvider()
                                            .getInboundProvisioningConfig().getProvisioningUserStore())) {

                                out.write("\n");
                                out.write(
                                        "                                          \t\t\t<option selected=\"selected\" value=\"");
                                out.print(Encode.forHtmlAttribute(userStoreDomain));
                                out.write('"');
                                out.write('>');
                                out.print(Encode.forHtmlContent(userStoreDomain));
                                out.write("</option>\n");
                                out.write("                                    ");

                            } else {

                                out.write("\n");
                                out.write("                                           \t\t\t<option value=\"");
                                out.print(Encode.forHtmlAttribute(userStoreDomain));
                                out.write('"');
                                out.write('>');
                                out.print(Encode.forHtmlContent(userStoreDomain));
                                out.write("</option>\n");
                                out.write("                                    ");

                            }
                        }
                    }
                }

                out.write("\n");
                out.write("                          </select>\n");
                out.write("                          <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f78(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    <tr>\n");
                out.write("                        <td>\n");
                out.write(
                        "                            <input type=\"checkbox\" name=\"dumb\" id=\"dumb\" value=\"false\" onclick =\"disable()\" ");
                out.print(appBean.getServiceProvider().getInboundProvisioningConfig().getDumbMode() ? "checked"
                        : "");
                out.write(">Enable Dumb Mode<br>\n");
                out.write("                            <div class=\"sectionHelp\">\n");
                out.write("                                ");
                if (_jspx_meth_fmt_005fmessage_005f79(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\n");
                out.write("                            </div>\n");
                out.write("                        </td>\n");
                out.write("                    </tr>\n");
                out.write("                    </table>\n");
                out.write("                </div>\n");
                out.write("            \n");
                out.write("            \n");
                out.write("            </div>\n");
                out.write("            \n");
                out.write(
                        "            <h2 id=\"outbound_provisioning_head\" class=\"sectionSeperator trigger active\">\n");
                out.write("                <a href=\"#\">");
                if (_jspx_meth_fmt_005fmessage_005f80(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("</a>\n");
                out.write("            </h2>\n");
                out.write(
                        "            <div class=\"toggle_container sectionSub\" style=\"margin-bottom:10px;\" id=\"outboundProvisioning\">\n");
                out.write("             <table class=\"styledLeft\" width=\"100%\" id=\"fed_auth_table\">\n");
                out.write("            \n");
                out.write("\t\t      ");
                if (idpType != null && idpType.length() > 0) {
                    out.write("\n");
                    out.write("\t\t       <thead> \n");
                    out.write("\t\t       \n");
                    out.write("\t\t\t\t\t<tr>\n");
                    out.write("\t\t\t\t\t\t<td>\t\t\t\t             \t  \n");
                    out.write(
                            "\t\t\t\t\t\t\t <select name=\"provisioning_idps\" style=\"float: left; min-width: 150px;font-size:13px;\">\n");
                    out.write("\t\t\t\t\t\t\t ");
                    out.print(idpType.toString());
                    out.write("\n");
                    out.write("\t\t\t\t\t\t\t </select>\n");
                    out.write(
                            "\t\t\t\t\t\t     <a id=\"provisioningIdpAdd\" onclick=\"addIDPRow(this);return false;\" class=\"icon-link\" style=\"background-image:url(images/add.gif);\"></a>\n");
                    out.write("\t\t\t\t\t\t</td>\n");
                    out.write("\t\t            </tr>\n");
                    out.write("\t\t           \n");
                    out.write("\t           </thead>\n");
                    out.write("\t            ");
                } else {
                    out.write("\n");
                    out.write(
                            "\t\t              <tr><td colspan=\"4\" style=\"border: none;\">There are no provisioning enabled identity providers defined in the system.</td></tr>\n");
                    out.write("\t\t        ");
                }
                out.write("\n");
                out.write("\t\t\t\t\t\t\t                 \n");
                out.write("\t           ");

                if (appBean.getServiceProvider().getOutboundProvisioningConfig() != null) {
                    IdentityProvider[] fedIdps = appBean.getServiceProvider().getOutboundProvisioningConfig()
                            .getProvisioningIdentityProviders();
                    if (fedIdps != null && fedIdps.length > 0) {
                        for (IdentityProvider idp : fedIdps) {
                            if (idp != null) {
                                boolean jitEnabled = false;
                                boolean blocking = false;

                                if (idp.getJustInTimeProvisioningConfig() != null
                                        && idp.getJustInTimeProvisioningConfig().getProvisioningEnabled()) {
                                    jitEnabled = true;
                                }
                                if (idp.getDefaultProvisioningConnectorConfig() != null
                                        && idp.getDefaultProvisioningConnectorConfig().getBlocking()) {
                                    blocking = true;
                                }

                                out.write("\n");
                                out.write("\t\t\t\t\t\t\t      \n");
                                out.write("\t\t\t\t\t\t\t      \t       <tr>\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t   <td>\n");
                                out.write(
                                        "\t\t\t\t\t\t\t      \t      \t\t<input name=\"provisioning_idp\" id=\"\" type=\"hidden\" value=\"");
                                out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                                out.write("\" />\n");
                                out.write("                                                    ");
                                out.print(Encode.forHtmlContent(idp.getIdentityProviderName()));
                                out.write("\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t</td>\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t<td> \n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t\t");
                                if (selectedProIdpConnectors.get(idp.getIdentityProviderName()) != null) {
                                    out.write("\n");
                                    out.write(
                                            "\t\t\t\t\t\t\t      \t      \t\t\t\t<select name=\"provisioning_con_idp_");
                                    out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                                    out.write("\" style=\"float: left; min-width: 150px;font-size:13px;\">");
                                    out.print(selectedProIdpConnectors.get(idp.getIdentityProviderName()));
                                    out.write("</select>\n");
                                    out.write("\t\t\t\t\t\t\t      \t      \t\t\t");
                                }
                                out.write("\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t</td>\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t <td>\n");
                                out.write(
                                        "                            \t\t\t\t\t\t<div class=\"sectionCheckbox\">\n");
                                out.write(
                                        "                                \t\t\t\t\t\t<input type=\"checkbox\" id=\"blocking_prov_");
                                out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                                out.write("\" name=\"blocking_prov_");
                                out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                                out.write('"');
                                out.write(' ');
                                out.print(blocking ? "checked" : "");
                                out.write(">Blocking\n");
                                out.write("                   \t\t\t\t\t\t\t\t\t</div>\n");
                                out.write("                        \t\t\t\t\t\t</td>\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t <td>\n");
                                out.write(
                                        "                            \t\t\t\t\t\t<div class=\"sectionCheckbox\">\n");
                                out.write(
                                        "                                \t\t\t\t\t\t<input type=\"checkbox\" id=\"provisioning_jit_");
                                out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                                out.write("\" name=\"provisioning_jit_");
                                out.print(Encode.forHtmlAttribute(idp.getIdentityProviderName()));
                                out.write('"');
                                out.write(' ');
                                out.print(jitEnabled ? "checked" : "");
                                out.write(">Enable JIT\n");
                                out.write("                   \t\t\t\t\t\t\t\t\t</div>\n");
                                out.write("                        \t\t\t\t\t\t</td>\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t<td class=\"leftCol-small\" >\n");
                                out.write(
                                        "\t\t\t\t\t\t\t      \t      \t\t<a onclick=\"deleteIDPRow(this);return false;\" href=\"#\" class=\"icon-link\" style=\"background-image: url(images/delete.gif)\"> Delete </a>\n");
                                out.write("\t\t\t\t\t\t\t      \t      \t\t</td>\n");
                                out.write("\t\t\t\t\t\t\t      \t       </tr>\t\t\t\t\t\t      \n");
                                out.write("\t\t\t    ");

                            }
                        }
                    }
                }

                out.write("\n");
                out.write("\t\t\t  </table>\n");
                out.write("            \n");
                out.write("            </div>          \n");
                out.write("\n");
                out.write("\t\t\t<div style=\"clear:both\"/>\n");
                out.write("            <!-- sectionSub Div -->\n");
                out.write("            <div class=\"buttonRow\">\n");
                out.write("                <input type=\"button\" value=\"");
                if (_jspx_meth_fmt_005fmessage_005f81(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\" onclick=\"createAppOnclick();\"/>\n");
                out.write("                <input type=\"button\" value=\"");
                if (_jspx_meth_fmt_005fmessage_005f82(_jspx_th_fmt_005fbundle_005f0, _jspx_page_context))
                    return;
                out.write("\" onclick=\"javascript:location.href='list-service-providers.jsp'\"/>\n");
                out.write("            </div>\n");
                out.write("            </form>\n");
                out.write("        </div>\n");
                out.write("    </div>\n");
                out.write("\n");
                int evalDoAfterBody = _jspx_th_fmt_005fbundle_005f0.doAfterBody();
                if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                    break;
            } while (true);
            if (_jspx_eval_fmt_005fbundle_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                out = _jspx_page_context.popBody();
            }
        }
        if (_jspx_th_fmt_005fbundle_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005ffmt_005fbundle_0026_005fbasename.reuse(_jspx_th_fmt_005fbundle_005f0);
            return;
        }
        _005fjspx_005ftagPool_005ffmt_005fbundle_0026_005fbasename.reuse(_jspx_th_fmt_005fbundle_005f0);
        out.write('\n');
    } catch (java.lang.Throwable t) {
        if (!(t instanceof javax.servlet.jsp.SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    if (response.isCommitted()) {
                        out.flush();
                    } else {
                        out.clearBuffer();
                    }
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
            else
                throw new ServletException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.decorators.general_002dbody_002dpre_jsp.java

public void _jspService(final javax.servlet.http.HttpServletRequest request,
        final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;

    try {/*www .  j  ava2  s . c  o  m*/
        response.setContentType("text/html");
        pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("<body id=\"jira\" class=\"aui-layout aui-theme-default ");
        out.print(JspDecoratorUtils.getBody().getBodyTagProperty("class"));
        out.write('"');
        out.write(' ');
        out.print(ComponentAccessor.getComponent(ProductVersionDataBeanProvider.class).get()
                .getBodyHtmlAttributes());
        out.write(">\n");
        out.write("<div id=\"page\">\n");
        out.write("    <header id=\"header\" role=\"banner\">\n");
        out.write("        ");
        out.write("\n");
        out.write("    ");
        out.write("\n");
        out.write("        ");
        out.write("\n");
        out.write("            ");
        out.write("\n");
        out.write("        ");
        out.write("\n");
        out.write("    ");
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write("\n");
        out.write("<script>\n");
        out.write("    AJS.$(function () {\n");
        out.write("        var licenseBanner = require(\"jira/license-banner\");\n");
        out.write("        licenseBanner.showLicenseBanner(\"");
        out.print(StringEscapeUtils.escapeEcmaScript(
                ComponentAccessor.getComponentOfType(LicenseBannerHelper.class).getExpiryBanner()));
        out.write("\");\n");
        out.write("        licenseBanner.showLicenseFlag(\"");
        out.print(StringEscapeUtils.escapeEcmaScript(
                ComponentAccessor.getComponentOfType(LicenseBannerHelper.class).getMaintenanceFlag()));
        out.write("\");\n");
        out.write("    });\n");
        out.write("</script>\n");
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write('\n');

        final User loggedInUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser();
        if (loggedInUser != null) {
            final InternalWebSudoManager websudoManager = ComponentAccessor
                    .getComponent(InternalWebSudoManager.class);

            if (websudoManager.isEnabled() && websudoManager.hasValidSession(session)) {
                request.setAttribute("helpUtil", HelpUtil.getInstance());

                out.write("\n");
                out.write("<div class=\"aui-message aui-message-warning\" id=\"websudo-banner\">\n");

                if (websudoManager.isWebSudoRequest(request)) {

                    out.write("\n");
                    out.write("    <p>\n");
                    out.write("        ");
                    if (_jspx_meth_ww_005ftext_005f0(_jspx_page_context))
                        return;
                    out.write("\n");
                    out.write("    </p>\n");

                } else {

                    out.write("\n");
                    out.write("    <p>\n");
                    out.write("        ");
                    if (_jspx_meth_ww_005ftext_005f1(_jspx_page_context))
                        return;
                    out.write("\n");
                    out.write("    </p>\n");

                }

                out.write("\n");
                out.write("</div>\n");

            }
        }

        out.write('\n');
        out.write('\n');
        out.write("\n");
        out.write("        ");
        out.write('\n');
        if (_jspx_meth_ww_005fbean_005f0(_jspx_page_context))
            return;
        out.write('\n');
        out.write('\n');

        final UnsupportedBrowserManager browserManager = ComponentAccessor
                .getComponent(UnsupportedBrowserManager.class);
        if (browserManager.isCheckEnabled() && !browserManager.isHandledCookiePresent(request)
                && browserManager.isUnsupportedBrowser(request)) {
            request.setAttribute("messageKey", browserManager.getMessageKey(request));

            out.write('\n');
            if (_jspx_meth_aui_005fcomponent_005f0(_jspx_page_context))
                return;
            out.write('\n');
        }
        out.write("\n");
        out.write("        ");
        out.write('\n');

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        ComponentAccessor.getComponent(HeaderFooterRendering.class).includeTopNavigation(out, request,
                JspDecoratorUtils.getBody());

        out.write("\n");
        out.write("    </header>\n");
        out.write("    ");
        out.write('\n');
        out.write('\n');

        AnnouncementBanner banner = ComponentAccessor.getComponentOfType(AnnouncementBanner.class);
        if (banner.isDisplay()) {

            out.write("\n");
            out.write("<div id=\"announcement-banner\" class=\"alertHeader\">\n");
            out.write("    ");
            out.print(banner.getViewHtml());
            out.write("\n");
            out.write("</div>\n");

        }

        out.write('\n');
        out.write("\n");
        out.write("    <section id=\"content\" role=\"main\">\n");
    } catch (java.lang.Throwable t) {
        if (!(t instanceof javax.servlet.jsp.SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
            else
                throw new ServletException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.decorators.general_jsp.java

public void _jspService(final javax.servlet.http.HttpServletRequest request,
        final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;

    try {//from  ww w.  j av a 2  s. co m
        response.setContentType("text/html");
        pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");

        WebResourceManager webResourceManager = ComponentAccessor.getComponent(WebResourceManager.class);
        webResourceManager.requireResourcesForContext("atl.general");
        webResourceManager.requireResourcesForContext("jira.general");

        final FieldsResourceIncluder headFieldResourceIncluder = ComponentAccessor
                .getComponent(FieldsResourceIncluder.class);
        headFieldResourceIncluder.includeFieldResourcesForCurrentUser();

        out.write('\n');
        out.write("\n");
        out.write("<!DOCTYPE html>\n");
        out.write("<html lang=\"");
        out.print(ComponentAccessor.getJiraAuthenticationContext().getI18nHelper().getLocale().getLanguage());
        out.write("\">\n");
        out.write("<head>\n");
        out.write("    ");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        //  decorator:usePage
        com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag _jspx_th_decorator_005fusePage_005f0 = (com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag) _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .get(com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag.class);
        _jspx_th_decorator_005fusePage_005f0.setPageContext(_jspx_page_context);
        _jspx_th_decorator_005fusePage_005f0.setParent(null);
        // /includes/decorators/aui-layout/head-common.jsp(8,0) name = id type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_decorator_005fusePage_005f0.setId("originalPage");
        int _jspx_eval_decorator_005fusePage_005f0 = _jspx_th_decorator_005fusePage_005f0.doStartTag();
        if (_jspx_th_decorator_005fusePage_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                    .reuse(_jspx_th_decorator_005fusePage_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .reuse(_jspx_th_decorator_005fusePage_005f0);
        com.opensymphony.module.sitemesh.Page originalPage = null;
        originalPage = (com.opensymphony.module.sitemesh.Page) _jspx_page_context.findAttribute("originalPage");
        out.write('\n');

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        HeaderFooterRendering headerFooterRendering = getComponent(HeaderFooterRendering.class);

        out.write("\n");
        out.write("<meta charset=\"utf-8\">\n");
        out.write("<meta http-equiv=\"X-UA-Compatible\" content=\"");
        out.print(headerFooterRendering.getXUACompatible(originalPage));
        out.write("\"/>\n");
        out.write("<title>");
        out.print(headerFooterRendering.getPageTitle(originalPage));
        out.write("</title>\n");

        // include version meta information
        headerFooterRendering.includeVersionMetaTags(out);

        headerFooterRendering.includeGoogleSiteVerification(out);

        // writes the <meta> tags into the page head
        headerFooterRendering.requireCommonMetadata();
        headerFooterRendering.includeMetadata(out);

        // include web panels
        headerFooterRendering.includeWebPanels(out, "atl.header");

        out.write('\n');
        out.write('\n');
        out.write('\n');

        XsrfTokenGenerator xsrfTokenGenerator = ComponentAccessor.getComponent(XsrfTokenGenerator.class);

        out.write("    \n");
        out.write("<meta id=\"atlassian-token\" name=\"atlassian-token\" content=\"");
        out.print(xsrfTokenGenerator.generateToken(request));
        out.write("\">\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("<link rel=\"shortcut icon\" href=\"");
        out.print(headerFooterRendering.getRelativeResourcePrefix());
        out.write("/favicon.ico\">\n");
        out.write("<link rel=\"search\" type=\"application/opensearchdescription+xml\" href=\"");
        out.print(request.getContextPath());
        out.write("/osd.jsp\" title=\"");
        out.print(headerFooterRendering.getPageTitle(originalPage));
        out.write("\"/>\n");
        out.write("\n");
        out.write("    ");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("<!--[if IE]><![endif]-->");
        out.write("\n");
        out.write("<script type=\"text/javascript\">var contextPath = '");
        out.print(request.getContextPath());
        out.write("';</script>\n");

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        HeaderFooterRendering headerAndFooter = ComponentAccessor.getComponent(HeaderFooterRendering.class);

        headerAndFooter.requireCommonResources();
        headerAndFooter.includeResources(out);

        out.write("\n");
        out.write("<script type=\"text/javascript\" src=\"");
        out.print(headerAndFooter.getKeyboardShortCutScript(request));
        out.write("\"></script>\n");

        headerAndFooter.includeWebPanels(out, "atl.header.after.scripts");

        out.write('\n');
        out.write("\n");
        out.write("    ");
        if (_jspx_meth_decorator_005fhead_005f0(_jspx_page_context))
            return;
        out.write("\n");
        out.write("</head>\n");
        out.write("<body id=\"jira\" class=\"aui-layout aui-theme-default ");
        if (_jspx_meth_decorator_005fgetProperty_005f0(_jspx_page_context))
            return;
        out.write('"');
        out.write(' ');
        out.print(ComponentAccessor.getComponent(ProductVersionDataBeanProvider.class).get()
                .getBodyHtmlAttributes());
        out.write(">\n");
        out.write("<div id=\"page\">\n");
        out.write("    <header id=\"header\" role=\"banner\">\n");
        out.write("        ");
        out.write("\n");
        out.write("    ");
        out.write("\n");
        out.write("        ");
        out.write("\n");
        out.write("            ");
        out.write("\n");
        out.write("        ");
        out.write("\n");
        out.write("    ");
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write("\n");
        out.write("<script>\n");
        out.write("    AJS.$(function () {\n");
        out.write("        var licenseBanner = require(\"jira/license-banner\");\n");
        out.write("        licenseBanner.showLicenseBanner(\"");
        out.print(StringEscapeUtils.escapeEcmaScript(
                ComponentAccessor.getComponentOfType(LicenseBannerHelper.class).getExpiryBanner()));
        out.write("\");\n");
        out.write("        licenseBanner.showLicenseFlag(\"");
        out.print(StringEscapeUtils.escapeEcmaScript(
                ComponentAccessor.getComponentOfType(LicenseBannerHelper.class).getMaintenanceFlag()));
        out.write("\");\n");
        out.write("    });\n");
        out.write("</script>\n");
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write('\n');

        final User loggedInUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser();
        if (loggedInUser != null) {
            final InternalWebSudoManager websudoManager = ComponentAccessor
                    .getComponent(InternalWebSudoManager.class);

            if (websudoManager.isEnabled() && websudoManager.hasValidSession(session)) {
                request.setAttribute("helpUtil", HelpUtil.getInstance());

                out.write("\n");
                out.write("<div class=\"aui-message aui-message-warning\" id=\"websudo-banner\">\n");

                if (websudoManager.isWebSudoRequest(request)) {

                    out.write("\n");
                    out.write("    <p>\n");
                    out.write("        ");
                    if (_jspx_meth_ww_005ftext_005f0(_jspx_page_context))
                        return;
                    out.write("\n");
                    out.write("    </p>\n");

                } else {

                    out.write("\n");
                    out.write("    <p>\n");
                    out.write("        ");
                    if (_jspx_meth_ww_005ftext_005f1(_jspx_page_context))
                        return;
                    out.write("\n");
                    out.write("    </p>\n");

                }

                out.write("\n");
                out.write("</div>\n");

            }
        }

        out.write('\n');
        out.write('\n');
        out.write("\n");
        out.write("        ");
        out.write('\n');
        if (_jspx_meth_ww_005fbean_005f0(_jspx_page_context))
            return;
        out.write('\n');
        out.write('\n');

        final UnsupportedBrowserManager browserManager = ComponentAccessor
                .getComponent(UnsupportedBrowserManager.class);
        if (browserManager.isCheckEnabled() && !browserManager.isHandledCookiePresent(request)
                && browserManager.isUnsupportedBrowser(request)) {
            request.setAttribute("messageKey", browserManager.getMessageKey(request));

            out.write('\n');
            if (_jspx_meth_aui_005fcomponent_005f0(_jspx_page_context))
                return;
            out.write('\n');
        }
        out.write("\n");
        out.write("        ");
        out.write('\n');
        out.write('\n');
        //  decorator:usePage
        com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag _jspx_th_decorator_005fusePage_005f1 = (com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag) _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .get(com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag.class);
        _jspx_th_decorator_005fusePage_005f1.setPageContext(_jspx_page_context);
        _jspx_th_decorator_005fusePage_005f1.setParent(null);
        // /includes/decorators/aui-layout/header.jsp(3,0) name = id type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_decorator_005fusePage_005f1.setId("p");
        int _jspx_eval_decorator_005fusePage_005f1 = _jspx_th_decorator_005fusePage_005f1.doStartTag();
        if (_jspx_th_decorator_005fusePage_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                    .reuse(_jspx_th_decorator_005fusePage_005f1);
            return;
        }
        _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .reuse(_jspx_th_decorator_005fusePage_005f1);
        com.opensymphony.module.sitemesh.Page p = null;
        p = (com.opensymphony.module.sitemesh.Page) _jspx_page_context.findAttribute("p");
        out.write('\n');

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        ComponentAccessor.getComponent(HeaderFooterRendering.class).includeTopNavigation(out, request, p);

        out.write("\n");
        out.write("    </header>\n");
        out.write("    ");
        out.write('\n');
        out.write('\n');

        AnnouncementBanner banner = ComponentAccessor.getComponentOfType(AnnouncementBanner.class);
        if (banner.isDisplay()) {

            out.write("\n");
            out.write("<div id=\"announcement-banner\" class=\"alertHeader\">\n");
            out.write("    ");
            out.print(banner.getViewHtml());
            out.write("\n");
            out.write("</div>\n");

        }

        out.write('\n');
        out.write("\n");
        out.write("    <section id=\"content\" role=\"main\">\n");
        out.write("        ");
        if (_jspx_meth_decorator_005fbody_005f0(_jspx_page_context))
            return;
        out.write("\n");
        out.write("    </section>\n");
        out.write("    <footer id=\"footer\" role=\"contentinfo\">\n");
        out.write("        ");
        out.write("\n");
        out.write("        ");
        out.write("\n");
        out.write("\n");
        out.write("<section class=\"footer-body\">\n");

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        HeaderFooterRendering footerRendering = getComponent(HeaderFooterRendering.class);
        footerRendering.includeFooters(out, request);
        // include web panels
        footerRendering.includeWebPanels(out, "atl.footer");

        out.write("\n");
        out.write("    <div id=\"footer-logo\"><a href=\"http://www.atlassian.com/\">Atlassian</a></div>\n");
        out.write("</section>\n");
        org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response,
                "/includes/decorators/global-translations.jsp", out, false);
        out.write("\n");
        out.write("    </footer>\n");
        out.write("</div>\n");
        out.write("</body>\n");
        out.write("</html>\n");
    } catch (java.lang.Throwable t) {
        if (!(t instanceof javax.servlet.jsp.SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
            else
                throw new ServletException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}

From source file:org.apache.jsp.decorators.panel_002dadmin_jsp.java

public void _jspService(final javax.servlet.http.HttpServletRequest request,
        final javax.servlet.http.HttpServletResponse response)
        throws java.io.IOException, javax.servlet.ServletException {

    final javax.servlet.jsp.PageContext pageContext;
    javax.servlet.http.HttpSession session = null;
    final javax.servlet.ServletContext application;
    final javax.servlet.ServletConfig config;
    javax.servlet.jsp.JspWriter out = null;
    final java.lang.Object page = this;
    javax.servlet.jsp.JspWriter _jspx_out = null;
    javax.servlet.jsp.PageContext _jspx_page_context = null;

    try {//from  w w  w. j  a  v  a  2s .  c o m
        response.setContentType("text/html");
        pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true);
        _jspx_page_context = pageContext;
        application = pageContext.getServletContext();
        config = pageContext.getServletConfig();
        session = pageContext.getSession();
        out = pageContext.getOut();
        _jspx_out = out;

        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        //  decorator:usePage
        com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag _jspx_th_decorator_005fusePage_005f0 = (com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag) _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .get(com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag.class);
        _jspx_th_decorator_005fusePage_005f0.setPageContext(_jspx_page_context);
        _jspx_th_decorator_005fusePage_005f0.setParent(null);
        // /decorators/panel-admin.jsp(17,0) name = id type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_decorator_005fusePage_005f0.setId("configPage");
        int _jspx_eval_decorator_005fusePage_005f0 = _jspx_th_decorator_005fusePage_005f0.doStartTag();
        if (_jspx_th_decorator_005fusePage_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                    .reuse(_jspx_th_decorator_005fusePage_005f0);
            return;
        }
        _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .reuse(_jspx_th_decorator_005fusePage_005f0);
        com.opensymphony.module.sitemesh.Page configPage = null;
        configPage = (com.opensymphony.module.sitemesh.Page) _jspx_page_context.findAttribute("configPage");
        out.write('\n');

        {
            final ComponentFactory factory = ComponentAccessor.getComponentOfType(ComponentFactory.class);
            final AdminDecoratorHelper helper = factory.createObject(AdminDecoratorHelper.class);

            helper.setCurrentSection(configPage.getProperty("meta.admin.active.section"));
            helper.setCurrentTab(configPage.getProperty("meta.admin.active.tab"));
            helper.setProject(configPage.getProperty("meta.projectKey"));

            request.setAttribute("adminHelper", helper);
            request.setAttribute("jira.admin.mode", true);
            request.setAttribute("jira.selected.section", helper.getSelectedMenuSection()); // Determine what tab should be active

            // Plugins 2.5 allows us to perform context-based resource inclusion. This defines the context "atl.admin"
            final WebResourceManager adminWebResourceManager = ComponentAccessor.getWebResourceManager();
            adminWebResourceManager.requireResourcesForContext("atl.admin");
            adminWebResourceManager.requireResourcesForContext("jira.admin");

            final KeyboardShortcutManager adminKeyboardShortcutManager = ComponentAccessor
                    .getComponentOfType(KeyboardShortcutManager.class);
            adminKeyboardShortcutManager.requireShortcutsForContext(KeyboardShortcutManager.Context.admin);
        }

        out.write("\n");
        out.write("<!DOCTYPE html>\n");
        out.write("<html>\n");
        out.write("<head>\n");
        out.write("    ");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        //  decorator:usePage
        com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag _jspx_th_decorator_005fusePage_005f1 = (com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag) _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .get(com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag.class);
        _jspx_th_decorator_005fusePage_005f1.setPageContext(_jspx_page_context);
        _jspx_th_decorator_005fusePage_005f1.setParent(null);
        // /includes/decorators/aui-layout/head-common.jsp(5,0) name = id type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_decorator_005fusePage_005f1.setId("originalPage");
        int _jspx_eval_decorator_005fusePage_005f1 = _jspx_th_decorator_005fusePage_005f1.doStartTag();
        if (_jspx_th_decorator_005fusePage_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                    .reuse(_jspx_th_decorator_005fusePage_005f1);
            return;
        }
        _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .reuse(_jspx_th_decorator_005fusePage_005f1);
        com.opensymphony.module.sitemesh.Page originalPage = null;
        originalPage = (com.opensymphony.module.sitemesh.Page) _jspx_page_context.findAttribute("originalPage");
        out.write('\n');

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        HeaderFooterRendering headerFooterRendering = getComponent(HeaderFooterRendering.class);

        out.write("\n");
        out.write("\n");
        out.write("<meta charset=\"utf-8\">\n");
        out.write("\n");
        out.write("<meta http-equiv=\"X-UA-Compatible\" content=\"");
        out.print(headerFooterRendering.getXUACompatible(originalPage));
        out.write("\"/>\n");
        out.write("<title>");
        out.print(headerFooterRendering.getPageTitle(originalPage));
        out.write("</title>\n");

        // include version meta information
        headerFooterRendering.includeVersionMetaTags(out);

        // writes the <meta> tags into the page head
        headerFooterRendering.includeMetadata(out);

        // include web panels
        headerFooterRendering.includeWebPanels(out, "atl.header");

        out.write('\n');
        out.write('\n');
        out.write('\n');

        XsrfTokenGenerator xsrfTokenGenerator = (XsrfTokenGenerator) ComponentManager
                .getComponentInstanceOfType(XsrfTokenGenerator.class);

        out.write("    \n");
        out.write("<meta id=\"atlassian-token\" name=\"atlassian-token\" content=\"");
        out.print(xsrfTokenGenerator.generateToken(request));
        out.write("\">\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("<link rel=\"shortcut icon\" href=\"");
        out.print(headerFooterRendering.getRelativeResourcePrefix());
        out.write("/favicon.ico\">\n");
        out.write("<link rel=\"search\" type=\"application/opensearchdescription+xml\" href=\"");
        out.print(request.getContextPath());
        out.write("/osd.jsp\" title=\"");
        out.print(headerFooterRendering.getPageTitle(originalPage));
        out.write("\"/>\n");
        out.write("\n");
        out.write("    ");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("<!--[if IE]><![endif]-->");
        out.write("\n");
        out.write("<script type=\"text/javascript\">var contextPath = '");
        out.print(request.getContextPath());
        out.write("';</script>\n");

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        HeaderFooterRendering headerAndFooter = ComponentAccessor.getComponent(HeaderFooterRendering.class);

        headerAndFooter.includeHeadResources(out);

        out.write("\n");
        out.write("<script type=\"text/javascript\" src=\"");
        out.print(headerAndFooter.getKeyboardShortCutScript(request));
        out.write("\"></script>\n");

        headerAndFooter.includeWebPanels(out, "atl.header.after.scripts");

        out.write('\n');
        out.write("\n");
        out.write("    ");
        if (_jspx_meth_decorator_005fhead_005f0(_jspx_page_context))
            return;
        out.write("\n");
        out.write("</head>\n");
        out.write("<body id=\"jira\" class=\"aui-layout aui-theme-default page-type-admin ");
        if (_jspx_meth_decorator_005fgetProperty_005f0(_jspx_page_context))
            return;
        out.write('"');
        out.write(' ');
        out.print(ComponentAccessor.getComponent(ProductVersionDataBeanProvider.class).get()
                .getBodyHtmlAttributes());
        out.write(">\n");
        out.write("<div id=\"page\">\n");
        out.write("    <header id=\"header\" role=\"banner\">\n");
        out.write("        ");
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write("\n");
        out.write("    ");
        out.write("\n");
        out.write("        ");
        out.write("\n");
        out.write("            ");
        out.write("\n");
        out.write("        ");
        out.write("\n");
        out.write("    ");
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write('\n');
        out.write('\n');

        final User loggedInUser = ComponentManager.getInstance().getJiraAuthenticationContext()
                .getLoggedInUser();
        if (loggedInUser != null) {

            final InternalWebSudoManager websudoManager = ComponentManager
                    .getComponentInstanceOfType(InternalWebSudoManager.class);

            if (websudoManager.isEnabled() && websudoManager.hasValidSession(session)) {
                request.setAttribute("helpUtil", HelpUtil.getInstance());

                out.write("\n");
                out.write("<div class=\"aui-message warning\" id=\"websudo-banner\">\n");

                if (websudoManager.isWebSudoRequest(request)) {

                    out.write("\n");
                    out.write("    <p>\n");
                    out.write("        <span class=\"aui-icon aui-icon-warning\"></span>\n");
                    out.write("        ");
                    if (_jspx_meth_ww_005ftext_005f0(_jspx_page_context))
                        return;
                    out.write("\n");
                    out.write("    </p>\n");

                } else {

                    out.write("\n");
                    out.write("    <p>\n");
                    out.write("        <span class=\"aui-icon aui-icon-warning\"></span>\n");
                    out.write("        ");
                    if (_jspx_meth_ww_005ftext_005f1(_jspx_page_context))
                        return;
                    out.write("\n");
                    out.write("    </p>\n");

                }

                out.write("\n");
                out.write("</div>\n");

            }
        }

        out.write('\n');
        out.write('\n');
        out.write("\n");
        out.write("        ");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");
        out.write("\n");

        ReindexMessageManager reindexMessageManager = ComponentAccessor
                .getComponentOfType(ReindexMessageManager.class);
        JiraAuthenticationContext authenticationContext = ComponentAccessor
                .getComponentOfType(JiraAuthenticationContext.class);
        final boolean isAdmin = ComponentAccessor.getComponentOfType(PermissionManager.class)
                .hasPermission(Permissions.ADMINISTER, authenticationContext.getUser());
        final String message = reindexMessageManager.getMessage(authenticationContext.getLoggedInUser());
        if (isAdmin && !StringUtils.isBlank(message)) {

            out.write('\n');
            //  aui:component
            webwork.view.taglib.ui.ComponentTag _jspx_th_aui_005fcomponent_005f0 = (webwork.view.taglib.ui.ComponentTag) _005fjspx_005ftagPool_005faui_005fcomponent_0026_005ftheme_005ftemplate
                    .get(webwork.view.taglib.ui.ComponentTag.class);
            _jspx_th_aui_005fcomponent_005f0.setPageContext(_jspx_page_context);
            _jspx_th_aui_005fcomponent_005f0.setParent(null);
            // /includes/admin/admin-info-notifications.jsp(17,0) name = template type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
            _jspx_th_aui_005fcomponent_005f0.setTemplate("auimessage.jsp");
            // /includes/admin/admin-info-notifications.jsp(17,0) name = theme type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
            _jspx_th_aui_005fcomponent_005f0.setTheme("'aui'");
            int _jspx_eval_aui_005fcomponent_005f0 = _jspx_th_aui_005fcomponent_005f0.doStartTag();
            if (_jspx_eval_aui_005fcomponent_005f0 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                if (_jspx_eval_aui_005fcomponent_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                    out = _jspx_page_context.pushBody();
                    _jspx_th_aui_005fcomponent_005f0.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                    _jspx_th_aui_005fcomponent_005f0.doInitBody();
                }
                do {
                    out.write("\n");
                    out.write("    ");
                    if (_jspx_meth_aui_005fparam_005f0(_jspx_th_aui_005fcomponent_005f0, _jspx_page_context))
                        return;
                    out.write("\n");
                    out.write("    ");
                    //  aui:param
                    webwork.view.taglib.ParamTag _jspx_th_aui_005fparam_005f1 = (webwork.view.taglib.ParamTag) _005fjspx_005ftagPool_005faui_005fparam_0026_005fname
                            .get(webwork.view.taglib.ParamTag.class);
                    _jspx_th_aui_005fparam_005f1.setPageContext(_jspx_page_context);
                    _jspx_th_aui_005fparam_005f1
                            .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_aui_005fcomponent_005f0);
                    // /includes/admin/admin-info-notifications.jsp(19,4) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                    _jspx_th_aui_005fparam_005f1.setName("'messageHtml'");
                    int _jspx_eval_aui_005fparam_005f1 = _jspx_th_aui_005fparam_005f1.doStartTag();
                    if (_jspx_eval_aui_005fparam_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                        if (_jspx_eval_aui_005fparam_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                            out = _jspx_page_context.pushBody();
                            _jspx_th_aui_005fparam_005f1
                                    .setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                            _jspx_th_aui_005fparam_005f1.doInitBody();
                        }
                        do {
                            out.print(message);
                            int evalDoAfterBody = _jspx_th_aui_005fparam_005f1.doAfterBody();
                            if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                break;
                        } while (true);
                        if (_jspx_eval_aui_005fparam_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                            out = _jspx_page_context.popBody();
                        }
                    }
                    if (_jspx_th_aui_005fparam_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                        _005fjspx_005ftagPool_005faui_005fparam_0026_005fname
                                .reuse(_jspx_th_aui_005fparam_005f1);
                        return;
                    }
                    _005fjspx_005ftagPool_005faui_005fparam_0026_005fname.reuse(_jspx_th_aui_005fparam_005f1);
                    out.write('\n');
                    int evalDoAfterBody = _jspx_th_aui_005fcomponent_005f0.doAfterBody();
                    if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                        break;
                } while (true);
                if (_jspx_eval_aui_005fcomponent_005f0 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                    out = _jspx_page_context.popBody();
                }
            }
            if (_jspx_th_aui_005fcomponent_005f0.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _005fjspx_005ftagPool_005faui_005fcomponent_0026_005ftheme_005ftemplate
                        .reuse(_jspx_th_aui_005fcomponent_005f0);
                return;
            }
            _005fjspx_005ftagPool_005faui_005fcomponent_0026_005ftheme_005ftemplate
                    .reuse(_jspx_th_aui_005fcomponent_005f0);
            out.write('\n');

        }

        UserUtil userUtil = ComponentAccessor.getComponentOfType(UserUtil.class);
        if (isAdmin && userUtil.hasExceededUserLimit()) {

            out.write('\n');
            //  aui:component
            webwork.view.taglib.ui.ComponentTag _jspx_th_aui_005fcomponent_005f1 = (webwork.view.taglib.ui.ComponentTag) _005fjspx_005ftagPool_005faui_005fcomponent_0026_005ftheme_005ftemplate_005fid
                    .get(webwork.view.taglib.ui.ComponentTag.class);
            _jspx_th_aui_005fcomponent_005f1.setPageContext(_jspx_page_context);
            _jspx_th_aui_005fcomponent_005f1.setParent(null);
            // /includes/admin/admin-info-notifications.jsp(28,0) name = id type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
            _jspx_th_aui_005fcomponent_005f1.setId("'adminMessages2'");
            // /includes/admin/admin-info-notifications.jsp(28,0) name = template type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
            _jspx_th_aui_005fcomponent_005f1.setTemplate("auimessage.jsp");
            // /includes/admin/admin-info-notifications.jsp(28,0) name = theme type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
            _jspx_th_aui_005fcomponent_005f1.setTheme("'aui'");
            int _jspx_eval_aui_005fcomponent_005f1 = _jspx_th_aui_005fcomponent_005f1.doStartTag();
            if (_jspx_eval_aui_005fcomponent_005f1 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                if (_jspx_eval_aui_005fcomponent_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                    out = _jspx_page_context.pushBody();
                    _jspx_th_aui_005fcomponent_005f1.setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                    _jspx_th_aui_005fcomponent_005f1.doInitBody();
                }
                do {
                    out.write("\n");
                    out.write("    ");
                    if (_jspx_meth_aui_005fparam_005f2(_jspx_th_aui_005fcomponent_005f1, _jspx_page_context))
                        return;
                    out.write("\n");
                    out.write("    ");
                    //  aui:param
                    webwork.view.taglib.ParamTag _jspx_th_aui_005fparam_005f3 = (webwork.view.taglib.ParamTag) _005fjspx_005ftagPool_005faui_005fparam_0026_005fname
                            .get(webwork.view.taglib.ParamTag.class);
                    _jspx_th_aui_005fparam_005f3.setPageContext(_jspx_page_context);
                    _jspx_th_aui_005fparam_005f3
                            .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_aui_005fcomponent_005f1);
                    // /includes/admin/admin-info-notifications.jsp(30,4) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                    _jspx_th_aui_005fparam_005f3.setName("'messageHtml'");
                    int _jspx_eval_aui_005fparam_005f3 = _jspx_th_aui_005fparam_005f3.doStartTag();
                    if (_jspx_eval_aui_005fparam_005f3 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                        if (_jspx_eval_aui_005fparam_005f3 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                            out = _jspx_page_context.pushBody();
                            _jspx_th_aui_005fparam_005f3
                                    .setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                            _jspx_th_aui_005fparam_005f3.doInitBody();
                        }
                        do {
                            out.write("\n");
                            out.write("        ");
                            //  ww:text
                            com.atlassian.jira.web.tags.TextTag _jspx_th_ww_005ftext_005f2 = (com.atlassian.jira.web.tags.TextTag) _005fjspx_005ftagPool_005fww_005ftext_0026_005fname
                                    .get(com.atlassian.jira.web.tags.TextTag.class);
                            _jspx_th_ww_005ftext_005f2.setPageContext(_jspx_page_context);
                            _jspx_th_ww_005ftext_005f2
                                    .setParent((javax.servlet.jsp.tagext.Tag) _jspx_th_aui_005fparam_005f3);
                            // /includes/admin/admin-info-notifications.jsp(31,8) name = name type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                            _jspx_th_ww_005ftext_005f2.setName("'admin.globalpermissions.user.limit.warning'");
                            int _jspx_eval_ww_005ftext_005f2 = _jspx_th_ww_005ftext_005f2.doStartTag();
                            if (_jspx_eval_ww_005ftext_005f2 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                                if (_jspx_eval_ww_005ftext_005f2 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                    out = _jspx_page_context.pushBody();
                                    _jspx_th_ww_005ftext_005f2
                                            .setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                                    _jspx_th_ww_005ftext_005f2.doInitBody();
                                }
                                do {
                                    out.write("\n");
                                    out.write("            ");
                                    //  ww:param
                                    webwork.view.taglib.ParamTag _jspx_th_ww_005fparam_005f8 = (webwork.view.taglib.ParamTag) _005fjspx_005ftagPool_005fww_005fparam_0026_005fname
                                            .get(webwork.view.taglib.ParamTag.class);
                                    _jspx_th_ww_005fparam_005f8.setPageContext(_jspx_page_context);
                                    _jspx_th_ww_005fparam_005f8.setParent(
                                            (javax.servlet.jsp.tagext.Tag) _jspx_th_ww_005ftext_005f2);
                                    // /includes/admin/admin-info-notifications.jsp(32,12) name = name type = java.lang.String reqTime = false required = false fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
                                    _jspx_th_ww_005fparam_005f8.setName("'value0'");
                                    int _jspx_eval_ww_005fparam_005f8 = _jspx_th_ww_005fparam_005f8
                                            .doStartTag();
                                    if (_jspx_eval_ww_005fparam_005f8 != javax.servlet.jsp.tagext.Tag.SKIP_BODY) {
                                        if (_jspx_eval_ww_005fparam_005f8 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                            out = _jspx_page_context.pushBody();
                                            _jspx_th_ww_005fparam_005f8
                                                    .setBodyContent((javax.servlet.jsp.tagext.BodyContent) out);
                                            _jspx_th_ww_005fparam_005f8.doInitBody();
                                        }
                                        do {
                                            out.write("<a href=\"");
                                            out.print(request.getContextPath());
                                            out.write("/secure/admin/ViewLicense!default.jspa\">");
                                            int evalDoAfterBody = _jspx_th_ww_005fparam_005f8.doAfterBody();
                                            if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                                break;
                                        } while (true);
                                        if (_jspx_eval_ww_005fparam_005f8 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                            out = _jspx_page_context.popBody();
                                        }
                                    }
                                    if (_jspx_th_ww_005fparam_005f8
                                            .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                                        _005fjspx_005ftagPool_005fww_005fparam_0026_005fname
                                                .reuse(_jspx_th_ww_005fparam_005f8);
                                        return;
                                    }
                                    _005fjspx_005ftagPool_005fww_005fparam_0026_005fname
                                            .reuse(_jspx_th_ww_005fparam_005f8);
                                    out.write("\n");
                                    out.write("            ");
                                    if (_jspx_meth_ww_005fparam_005f9(_jspx_th_ww_005ftext_005f2,
                                            _jspx_page_context))
                                        return;
                                    out.write("\n");
                                    out.write("        ");
                                    int evalDoAfterBody = _jspx_th_ww_005ftext_005f2.doAfterBody();
                                    if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                        break;
                                } while (true);
                                if (_jspx_eval_ww_005ftext_005f2 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                                    out = _jspx_page_context.popBody();
                                }
                            }
                            if (_jspx_th_ww_005ftext_005f2
                                    .doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                                _005fjspx_005ftagPool_005fww_005ftext_0026_005fname
                                        .reuse(_jspx_th_ww_005ftext_005f2);
                                return;
                            }
                            _005fjspx_005ftagPool_005fww_005ftext_0026_005fname
                                    .reuse(_jspx_th_ww_005ftext_005f2);
                            out.write("\n");
                            out.write("    ");
                            int evalDoAfterBody = _jspx_th_aui_005fparam_005f3.doAfterBody();
                            if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                                break;
                        } while (true);
                        if (_jspx_eval_aui_005fparam_005f3 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                            out = _jspx_page_context.popBody();
                        }
                    }
                    if (_jspx_th_aui_005fparam_005f3.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                        _005fjspx_005ftagPool_005faui_005fparam_0026_005fname
                                .reuse(_jspx_th_aui_005fparam_005f3);
                        return;
                    }
                    _005fjspx_005ftagPool_005faui_005fparam_0026_005fname.reuse(_jspx_th_aui_005fparam_005f3);
                    out.write('\n');
                    int evalDoAfterBody = _jspx_th_aui_005fcomponent_005f1.doAfterBody();
                    if (evalDoAfterBody != javax.servlet.jsp.tagext.BodyTag.EVAL_BODY_AGAIN)
                        break;
                } while (true);
                if (_jspx_eval_aui_005fcomponent_005f1 != javax.servlet.jsp.tagext.Tag.EVAL_BODY_INCLUDE) {
                    out = _jspx_page_context.popBody();
                }
            }
            if (_jspx_th_aui_005fcomponent_005f1.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
                _005fjspx_005ftagPool_005faui_005fcomponent_0026_005ftheme_005ftemplate_005fid
                        .reuse(_jspx_th_aui_005fcomponent_005f1);
                return;
            }
            _005fjspx_005ftagPool_005faui_005fcomponent_0026_005ftheme_005ftemplate_005fid
                    .reuse(_jspx_th_aui_005fcomponent_005f1);
            out.write('\n');

        }

        out.write("\n");
        out.write("        ");
        out.write('\n');
        out.write('\n');
        if (_jspx_meth_ww_005fbean_005f0(_jspx_page_context))
            return;
        out.write('\n');
        out.write('\n');
        out.write('\n');

        final UnsupportedBrowserManager browserManager = ComponentManager
                .getComponentInstanceOfType(UnsupportedBrowserManager.class);
        if (browserManager.isCheckEnabled() && !browserManager.isHandledCookiePresent(request)
                && browserManager.isUnsupportedBrowser(request)) {
            request.setAttribute("messageKey", browserManager.getMessageKey(request));

            out.write('\n');
            if (_jspx_meth_aui_005fcomponent_005f2(_jspx_page_context))
                return;
            out.write('\n');
        }
        out.write("\n");
        out.write("        ");
        out.write('\n');
        out.write('\n');
        //  decorator:usePage
        com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag _jspx_th_decorator_005fusePage_005f2 = (com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag) _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .get(com.opensymphony.module.sitemesh.taglib.decorator.UsePageTag.class);
        _jspx_th_decorator_005fusePage_005f2.setPageContext(_jspx_page_context);
        _jspx_th_decorator_005fusePage_005f2.setParent(null);
        // /includes/decorators/aui-layout/header.jsp(3,0) name = id type = java.lang.String reqTime = false required = true fragment = false deferredValue = false expectedTypeName = null deferredMethod = false methodSignature = null
        _jspx_th_decorator_005fusePage_005f2.setId("p");
        int _jspx_eval_decorator_005fusePage_005f2 = _jspx_th_decorator_005fusePage_005f2.doStartTag();
        if (_jspx_th_decorator_005fusePage_005f2.doEndTag() == javax.servlet.jsp.tagext.Tag.SKIP_PAGE) {
            _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                    .reuse(_jspx_th_decorator_005fusePage_005f2);
            return;
        }
        _005fjspx_005ftagPool_005fdecorator_005fusePage_0026_005fid_005fnobody
                .reuse(_jspx_th_decorator_005fusePage_005f2);
        com.opensymphony.module.sitemesh.Page p = null;
        p = (com.opensymphony.module.sitemesh.Page) _jspx_page_context.findAttribute("p");
        out.write('\n');

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        ComponentAccessor.getComponent(HeaderFooterRendering.class).includeTopNavigation(out, request, p);

        out.write("\n");
        out.write("    </header>\n");
        out.write("    ");
        out.write('\n');
        out.write('\n');

        AnnouncementBanner banner = ComponentAccessor.getComponentOfType(AnnouncementBanner.class);
        if (banner.isDisplay()) {

            out.write("\n");
            out.write("<div id=\"announcement-banner\" class=\"alertHeader\">\n");
            out.write("    ");
            out.print(banner.getViewHtml());
            out.write("\n");
            out.write("</div>\n");

        }

        out.write('\n');
        out.write("\n");
        out.write("    <section id=\"content\" role=\"main\">\n");
        out.write("        ");
        if (_jspx_meth_ui_005fsoy_005f0(_jspx_page_context))
            return;
        out.write("\n");
        out.write("    </section>\n");
        out.write("    <footer id=\"footer\" role=\"contentinfo\">\n");
        out.write("        ");
        out.write('\n');
        out.write('\n');

        //
        // IDEA gives you a warning below because it cant resolve JspWriter.  I don't know why but its harmless
        //
        getComponent(HeaderFooterRendering.class).includeFooters(out, request);

        out.write('\n');
        org.apache.jasper.runtime.JspRuntimeLibrary.include(request, response,
                "/includes/decorators/global-translations.jsp", out, false);
        out.write("\n");
        out.write("    </footer>\n");
        out.write("</div>\n");
        out.write("</body>\n");
        out.write("</html>\n");
    } catch (java.lang.Throwable t) {
        if (!(t instanceof javax.servlet.jsp.SkipPageException)) {
            out = _jspx_out;
            if (out != null && out.getBufferSize() != 0)
                try {
                    out.clearBuffer();
                } catch (java.io.IOException e) {
                }
            if (_jspx_page_context != null)
                _jspx_page_context.handlePageException(t);
            else
                throw new ServletException(t);
        }
    } finally {
        _jspxFactory.releasePageContext(_jspx_page_context);
    }
}