<%@ page import="com.atlassian.spring.container.ContainerManager" %> <%@ page import="com.atlassian.confluence.util.PatternLayoutWithStackTrace" %> <%@ page import="com.atlassian.confluence.util.GeneralUtil" %> <%@ page import="com.atlassian.confluence.security.trust.KeyPairInitialiser" %> <% boolean doUpgrade = Boolean.valueOf(request.getParameter("doUpgrade")).booleanValue(); if (doUpgrade) { KeyPairInitialiser keyPairInitialiser = (KeyPairInitialiser) ContainerManager.getComponent("keyPairInitialiser"); try { keyPairInitialiser.initConfluenceKey(); out.println("KEYSTORE table initialised successfully."); } catch (Exception e) { out.print("Error occurred trying to initialise keystore table:
"); %>
<%
            StringBuffer stacktraceBuffer = new StringBuffer();
            PatternLayoutWithStackTrace.appendStackTrace(stacktraceBuffer, e);
            out.print(GeneralUtil.htmlEncode(stacktraceBuffer.toString()));
%>
        
<% } } else { %>

This JSP will initialise your KEYSTORE table. Do you wish to proceed?

<% } %>