001    package jsp;
002    
003    import javax.servlet.*;
004    import javax.servlet.http.*;
005    import javax.servlet.jsp.*;
006    
007    public final class submitCSR_jsp extends org.apache.jasper.runtime.HttpJspBase
008        implements org.apache.jasper.runtime.JspSourceDependent {
009    
010      private static final JspFactory _jspxFactory = JspFactory.getDefaultFactory();
011    
012      private static java.util.List _jspx_dependants;
013    
014      private javax.el.ExpressionFactory _el_expressionfactory;
015      private org.apache.InstanceManager _jsp_instancemanager;
016    
017      public Object getDependants() {
018        return _jspx_dependants;
019      }
020    
021      public void _jspInit() {
022        _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory();
023        _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig());
024      }
025    
026      public void _jspDestroy() {
027      }
028    
029      public void _jspService(HttpServletRequest request, HttpServletResponse response)
030            throws java.io.IOException, ServletException {
031    
032        PageContext pageContext = null;
033        HttpSession session = null;
034        ServletContext application = null;
035        ServletConfig config = null;
036        JspWriter out = null;
037        Object page = this;
038        JspWriter _jspx_out = null;
039        PageContext _jspx_page_context = null;
040    
041    
042        try {
043          response.setContentType("text/html; charset=ISO-8859-1");
044          pageContext = _jspxFactory.getPageContext(this, request, response,
045                            null, true, 8192, true);
046          _jspx_page_context = pageContext;
047          application = pageContext.getServletContext();
048          config = pageContext.getServletConfig();
049          session = pageContext.getSession();
050          out = pageContext.getOut();
051          _jspx_out = out;
052    
053          out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\n<title>Submit CSR</title>\n</head>\n<script language=\"JavaScript\">\nfunction validateForm(){\n    if(document.Confirmform.pkcs10req.value.length < 1) {\n        alert(\"CSR text is empty.\");\n        document.Confirmform.pkcs10req.focus();\n        return false;\n    }\n    return true;\n}\n</script>\n<body>\n<h2>Request Certificate: Submit CSR</h2>\n<p>This is page lets you submit a CSR text directly without having to generate a request using the web browser.\n   Upon clicking the <i>Submit CSR</i> button, your CSR will sent to the CA for further\n   processing.</p>\n\n<form name=\"Confirmform\" action=\"CertificateRequestServlet\" method=\"post\">\n    <table border=\"0\">\n        <tr>\n            <th colspan=\"2\" align=\"left\">CSR Text</th>\n        </tr>\n        <tr>\n            <td colspan=\"2\">\n                <textarea rows=\"15\" cols=\"80\" name=\"pkcs10req\">\n");
054          out.write("                ...paste pkcs10 encoded certificate request here...\n                </textarea>\n            </td>\n        </tr>\n    </table>\n    <input type=\"submit\" name=\"submit\" value=\"Submit CSR\" onClick=\"return validateForm();\"/>\n    <input type=\"reset\" name=\"reset\" value=\"Reset\"/>\n</form>\n<a href=\"");
055          out.print(request.getContextPath());
056          out.write("\">Cancel</a>\n</body>\n</html>\n");
057        } catch (Throwable t) {
058          if (!(t instanceof SkipPageException)){
059            out = _jspx_out;
060            if (out != null && out.getBufferSize() != 0)
061              try { out.clearBuffer(); } catch (java.io.IOException e) {}
062            if (_jspx_page_context != null) _jspx_page_context.handlePageException(t);
063          }
064        } finally {
065          _jspxFactory.releasePageContext(_jspx_page_context);
066        }
067      }
068    }