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 final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
012
013 private static java.util.List _jspx_dependants;
014
015 private javax.el.ExpressionFactory _el_expressionfactory;
016 private org.apache.InstanceManager _jsp_instancemanager;
017
018 public Object getDependants() {
019 return _jspx_dependants;
020 }
021
022 public void _jspInit() {
023 _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
024 _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
025 }
026
027 public void _jspDestroy() {
028 }
029
030 public void _jspService(HttpServletRequest request, HttpServletResponse response)
031 throws java.io.IOException, ServletException {
032
033 PageContext pageContext = null;
034 HttpSession session = null;
035 ServletContext application = null;
036 ServletConfig config = null;
037 JspWriter out = null;
038 Object page = this;
039 JspWriter _jspx_out = null;
040 PageContext _jspx_page_context = null;
041
042
043 try {
044 response.setContentType("text/html; charset=ISO-8859-1");
045 pageContext = _jspxFactory.getPageContext(this, request, response,
046 null, true, 8192, true);
047 _jspx_page_context = pageContext;
048 application = pageContext.getServletContext();
049 config = pageContext.getServletConfig();
050 session = pageContext.getSession();
051 out = pageContext.getOut();
052 _jspx_out = out;
053
054 out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n");
055
056 Object certReqStore = CAHelperUtils.getCertificateRequestStore();
057 Object certStore = CAHelperUtils.getCertificateStore();
058
059 out.write("<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");
060 if(certReqStore == null) {
061 out.write("<p>A ceritificate request store is not available. Application can not receive Certificate Signing Requests.</p>\n");
062 }
063 if(certStore == null) {
064 out.write("<p>A ceritificate store is not available. Application can not upload certificates.</p>\n");
065 }
066 if(certReqStore == null || certStore == null) {
067 out.write("<p>Please contact the system administrator.</p>\n");
068 } else {
069 out.write("<!-- 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");
070 }
071 out.write("</body>\n</html>\n");
072 } catch (Throwable t) {
073 if (!(t instanceof SkipPageException)){
074 out = _jspx_out;
075 if (out != null && out.getBufferSize() != 0)
076 try { out.clearBuffer(); } catch (java.io.IOException e) {}
077 if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
078 }
079 } finally {
080 _jspxFactory.releasePageContext(_jspx_page_context);
081 }
082 }
083 }