%@ include file="header.jsp" %> <%@ import = "javax.mail.*,javax.mail.internet.*,javax.activation.*,java.net.InetAddress" %> <% boolean shouldShowFirstForm = true; boolean shouldShowSecondForm = true; String param_info[][] = { {"companyName", "Company Name", "not required", ""}, {"firstName", "First Name", "required", "You must enter your First Name"}, {"lastName", "Last Name", "required", "You must enter your Last Name"}, {"address1", "Address 1", "required", "You must enter your Address"}, {"address2", "Address 2", "not required", ""}, {"city", "City", "required", "You must enter your City"}, {"state", "State", "required", "You must enter your State"}, {"zip", "Zip Code", "required", "You must enter your Zip"}, {"phone", "Phone", "required", "You must enter your Phone Number"}, {"fax", "Fax", "not required", ""}, {"email", "E-Mail", "required", "You must enter your E-Mail"}, {"numberEmployees", "Number Employees", "not required", ""}, {"typePolicy", "Type Policy", "required", "You must indicate what type of coverage you wish."}, {"renewalDateMonth", "Renewal Month", "not required", ""}, {"renewalDateDay", "Renewal Day", "not required", ""}, {"renewalDateYear", "Renewal Year", "not required", ""}, {"currentCarrier", "Current Carrier", "required", "You must list the name of your current carrier. If you don't currently have coverage, please enter 'None'."}, {"descriptionPlan", "Description of Plan", "not required", ""}, {"remarks", "Remarks", "not required", ""}, }; if (request.getParameter("op") == null) { shouldShowFirstForm = true; shouldShowSecondForm = false; } else { if (request.getParameter("op").equals("Initial")) { String errmsg = ""; for (int i = 0; i < param_info.length; i++) { // Test if (param_info[i][2] == "required") { if ((request.getParameter(param_info[i][0]) == null) || (request.getParameter(param_info[i][0]).length() == 0)) { errmsg = errmsg.concat("
| Sorry Your Application Is Incomplete |
| We are missing some required information from the form you submitted. The following is a list of corrections you must make before we can process your application. Please make the corrections to the form below and resend it. |
");
out.println("
|
"); } } } %> <% if (shouldShowFirstForm == true) { %>