001 package jsp;
002
003 import javax.servlet.*;
004 import javax.servlet.http.*;
005 import javax.servlet.jsp.*;
006 import org.apache.geronimo.ca.helper.util.CAHelperUtils;
007
008 public final class index_jsp extends org.apache.jasper.runtime.HttpJspBase
009 implements org.apache.jasper.runtime.JspSourceDependent {
010
011 private static java.util.List _jspx_dependants;
012
013 public Object getDependants() {
014 return _jspx_dependants;
015 }
016
017 public void _jspService(HttpServletRequest request, HttpServletResponse response)
018 throws java.io.IOException, ServletException {
019
020 JspFactory _jspxFactory = null;
021 PageContext pageContext = null;
022 HttpSession session = null;
023 ServletContext application = null;
024 ServletConfig config = null;
025 JspWriter out = null;
026 Object page = this;
027 JspWriter _jspx_out = null;
028 PageContext _jspx_page_context = null;
029
030
031 try {
032 _jspxFactory = JspFactory.getDefaultFactory();
033 response.setContentType("text/html; charset=ISO-8859-1");
034 pageContext = _jspxFactory.getPageContext(this, request, response,
035 null, true, 8192, true);
036 _jspx_page_context = pageContext;
037 application = pageContext.getServletContext();
038 config = pageContext.getServletConfig();
039 session = pageContext.getSession();
040 out = pageContext.getOut();
041 _jspx_out = out;
042
043 out.write("\n\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n\n");
044
045 Object certReqStore = CAHelperUtils.getCertificateRequestStore();
046 Object certStore = CAHelperUtils.getCertificateStore();
047
048 out.write("\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n<title>CA Helper Application</title>\n</head>\n<body>\n<h2>CA Helper Application</h2>\n<p>Welcome to CA Helper application. <p>\n\n");
049 if(certReqStore == null) {
050 out.write("\n<p>A ceritificate request store is not available. Application can not receive Certificate Signing Requests.</p>\n");
051 }
052 out.write('\n');
053 if(certStore == null) {
054 out.write("\n<p>A ceritificate store is not available. Application can not upload certificates.</p>\n");
055 }
056 out.write('\n');
057 if(certReqStore == null || certStore == null) {
058 out.write("\n<p>Please contact the system administrator.</p>\n");
059 } else {
060 out.write("\n<!-- The following is used to detect if the browser supports KEYGEN tag -->\n<div style=\"display:none\"><form name='keygentest'><keygen name=\"test\"/></form></div>\n<script>\nif(document.keygentest.elements.length == 0) {\n document.write('Your browser does not support KEYGEN tag. This application requires a browser that supports KEYGEN.');\n} else {\n document.write('<p>This application allows you to submit certificate requests, download and install certificates issued by the CA.</p>');\n document.write(\n '<table border=\"0\">'+\n '<tr>'+\n '<td> <a href=\"requestCertificate.jsp\">Request Certificate</a> </td>'+\n '<td> <a href=\"downloadCertificate.jsp\">Download your Certificate</a> </td>'+\n '<td> <a href=\"downloadCACertificate.jsp\">Download CA Certificate</a> </td>'+\n '</tr>'+\n '</table>'\n )\n}\n</script>\n");
061 }
062 out.write("\n</body>\n</html>\n");
063 } catch (Throwable t) {
064 if (!(t instanceof SkipPageException)){
065 out = _jspx_out;
066 if (out != null && out.getBufferSize() != 0)
067 out.clearBuffer();
068 if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
069 }
070 } finally {
071 if (_jspxFactory != null) _jspxFactory.releasePageContext(_jspx_page_context);
072 }
073 }
074 }