/**
   * Method execute
   *
   * @param mapping
   * @param form
   * @param request
   * @param response
   * @return ActionForward
   */
  public ActionForward execute(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response) {
    MentorReqResponseForm responseForm =
        (MentorReqResponseForm) form; // TODO Auto-generated method stub
    RootMaster rootMaster = new RootMaster();
    AdvtMaster advtMaster = new AdvtMaster();
    HttpSession session = request.getSession();
    String uId = (String) session.getAttribute("uId");

    String compId = (String) session.getAttribute("compId");
    Vector allRights = (Vector) session.getAttribute("allRights");
    String adminFlag = allRights.elementAt(18).toString();
    if (((String) session.getAttribute("flag1")).equalsIgnoreCase("1")) {

      Vector<String> dataVec = new Vector<String>();
      String responseTextt = responseForm.getResponsetext();
      ////
      // System.out.println("request.getParameter...respIdrespIdrespId>>>>>"+request.getParameter("respid"));
      String respId = request.getParameter("respid");
      String complaintId = request.getParameter("compId");
      String flagforcom =
          (request.getParameter("flagforcom") != null) ? request.getParameter("flagforcom") : "";
      String recpType =
          (request.getParameter("respType") != null) ? request.getParameter("respType") : "";
      String accept1 =
          (request.getParameter("accept") != null) ? request.getParameter("accept") : "";
      //// System.out.println("to accept...in respons  .....accept....."+accept1);
      String flag = (request.getParameter("flag") != null) ? request.getParameter("flag") : "";
      if (request.getParameter("flag") != null) {
        flag = request.getParameter("flag").trim();
      } else {
        flag = "0";
      }
      //////// System.out.println("to flag...in respons  .....flag.IN RESPaCTION	...."+flag);
      String uid = (String) session.getAttribute("uId");
      java.util.Date dt = new java.util.Date();
      SimpleDateFormat sform = new SimpleDateFormat("yyyy-MM-dd, HH:mm:ss");
      String completeRemDate = sform.format(dt);
      StringTokenizer sttotal = new StringTokenizer(completeRemDate, ",");
      String creationDate = sttotal.nextToken();
      String creationTime = sttotal.nextToken();

      dataVec.add(responseTextt);
      dataVec.add(creationDate);
      dataVec.add(complaintId);
      dataVec.add(uid);
      dataVec.add(creationTime);
      dataVec.add(respId);
      dataVec.add(flag);
      dataVec.add("0");
      dataVec.add("1");
      dataVec.add("0");
      if (flag.equalsIgnoreCase("1")) {
        dataVec.add("Accept");

      } else if (flag.equalsIgnoreCase("0")) {
        dataVec.add("Reject");

      } else {
        dataVec.add("");
      }
      dataVec.add(flagforcom);
      String result = rootMaster.insertMenResponse(getDataSource(request, "advt"), dataVec);

      if ((result.equalsIgnoreCase("success")) && (!respId.equalsIgnoreCase("0"))) {
        ActionErrors errors = new ActionErrors();
        errors.clear();
        errors.add("reply", new ActionError("errors.entp.replySuccess"));
        saveErrors(request, errors);
        result = "success";
      } else if (result.equalsIgnoreCase("success")) {
        ActionErrors errors = new ActionErrors();
        errors.clear();
        errors.add("response", new ActionError("errors.entp.responseSuccess"));
        saveErrors(request, errors);
        result = "success";
      }

      if (result.equalsIgnoreCase("success")) {
        if (!respId.equalsIgnoreCase("0")) {
          Vector<String> respVec = new Vector<String>();
          respVec.add(respId);
          respVec.add("advt");
          // update `entp_rflag` for communication table.
          result = rootMaster.updateResponseFlag(getDataSource(request, "advt"), respVec);
        }
      }

      ////////////// for mail///////////////
      if (result.equalsIgnoreCase("success")) {

        EntpMaster entpMaster = new EntpMaster();
        IndvMaster indvMaster = new IndvMaster();
        Vector<String> complaintVec = new Vector<String>();
        int cid = Integer.parseInt(complaintId);
        complaintVec = entpMaster.getComplaintDetails(getDataSource(request, "advt"), cid);
        String login_id = complaintVec.elementAt(3).toString();
        String cu_id = complaintVec.elementAt(6).toString();
        String fcomId = complaintVec.elementAt(7).toString();

        Vector<String> paramVec = new Vector<String>();

        //////// System.out.println("to Enterprise.............mail");
        paramVec.add(uid);
        paramVec.add(login_id);
        if (!cu_id.equalsIgnoreCase("0")) {
          paramVec.add(cu_id);
          //////// System.out.println(" to Enterprise..in if...........mail");
        }
        Vector emailVec = indvMaster.getEmailList(getDataSource(request, "advt"), paramVec);
        //////// System.out.println("emailVec..............."+emailVec);

        Vector<String> tempMailParam = new Vector<String>();
        tempMailParam.add("Corporates"); // sender company type Advertiser
        tempMailParam.add("Student"); // receipient company type Enterprise
        if (respId.equalsIgnoreCase("0")) {
          //////// System.out.println("Response if status in brand");
          tempMailParam.add("Response"); // mail description
        } else {
          //////// System.out.println("Reply else status in brand");
          tempMailParam.add("Reply"); // mail description
        }

        // get mail text alert fot sending mail to core user and admin core user
        String mailTextLAlert =
            rootMaster.getMailText(getDataSource(request, "advt"), tempMailParam);
        Vector brandVec = (Vector) emailVec.elementAt(0);
        String brandName =
            brandVec.elementAt(0).toString() + " " + brandVec.elementAt(1).toString();
        String brandmail = brandVec.elementAt(2).toString().trim();
        String subject = "";
        if (flag.equalsIgnoreCase("1")) {
          // dataVec.add("Accept");
          subject = "Acceptance of the mentoring request having reference id as (" + fcomId + ").";

        } else if (flag.equalsIgnoreCase("0")) {
          // dataVec.add("Reject");
          subject = "Denial of the mentoring request having reference id as (" + fcomId + ").";

        } else if (respId.equalsIgnoreCase("0")) {

          subject = "Response on mentoring request Id (" + fcomId + ") By " + brandName + ".";
        } else {

          subject =
              "Reply to your mail on mentoring request Id (" + fcomId + ") By " + brandName + ".";
        }

        for (int i = 1; i < emailVec.size(); i++) {
          MailText mt = new MailText();
          Resource resr = new Resource();
          Vector coreMailVec = (Vector) emailVec.elementAt(i);
          String strMailText =
              mt.getReplyByBrand(coreMailVec, fcomId, mailTextLAlert, brandName, flag);

          ////// System.out.println("strMailText....."+strMailText);

          String strEmailStatus =
              resr.sendMail(
                  strMailText,
                  Constant.Email_Sender,
                  ((Vector) emailVec.elementAt(i)).elementAt(2).toString(),
                  subject);
          ////// System.out.println("str Email status in corpo....."+strEmailStatus);
        }
      }
      ///////////////// end mail////////////

      session.setAttribute("numCid", complaintId);
      session.setAttribute("strResult", result);

      Vector dataVec1 = new Vector();
      dataVec1.add(uId);
      dataVec1.add(compId);
      dataVec1.add(adminFlag);
      Vector advtCountVec = advtMaster.complaintCountAdvt(getDataSource(request, "advt"), dataVec1);
      session.setAttribute("advtCountVec", advtCountVec);
      //////// System.out.println("advtCountVec.............ResponseAction...........
      // "+advtCountVec);
      if (result.equalsIgnoreCase("success")) {
        session.setAttribute("flag1", "0");
      }
      return mapping.findForward(result);
    } else {

      return mapping.findForward("success");
    }
  }
  private String getComplaintList(
      String searchFor,
      DataSource dataSource,
      int numcount,
      String strComFIdOrder,
      String strCTitelOrder,
      String strDateOrder,
      int minVal,
      int maxVal,
      int totalRow,
      String strPageHtml,
      Vector userVec,
      String pageid,
      String lowerSubTag,
      int regFlag,
      String City,
      String brand,
      String category,
      String city,
      String brandname,
      int remander,
      String firstname,
      String mon,
      String nYr) {
    RootMaster rootMaster = new RootMaster();

    String strValue = "";
    strValue += "<div style=\"float:left; width:775px;\">";
    strValue += "<div style=\"float:left; width:640px;\">";
    strValue += "<div class=\"Page_Heading\" style=\"width:99%;\">";
    strValue += "<div class=\"Page_Heading_Text\" style=\"width: 70%;\">List of complaints</div>";

    if (numcount != 0) {
      strValue += "<div style=\"float: left;\">";
      strValue +=
          "<a style=\"font-size: 10px; font-weight: bold; color: rgb(0, 0, 0);\">Total matches Found "
              + numcount
              + "</a></div>";
    }
    strValue += "</div>";

    if (userVec.size() == 0) {
      strValue += "<div class=\"Fields_Container\">";
      strValue += "<div>";

      if (lowerSubTag.equalsIgnoreCase("2")) {
        strValue += "<div class=\"Fields_Row_2_head\">";
        strValue += "<div class=\"Fields_Col_1a\">No Complaints Found.";
        strValue += "</div></div>";

      } else {
        strValue += "<div class=\"Fields_Row_2_head\">";
        strValue += "<div class=\"Fields_Col_1a\">No Complaints Found.";
        strValue += "</div></div>";
      }
      strValue += "</div></div>";
    } else {

      strValue += "<div class=\"Fields_Container\">";
      strValue += "<div>";

      strValue += "<div class=\"Fields_Row_2_head\" style=\"font-size:11px; width:99%;\">";
      strValue += "<div class=\"Row_2_Fields_head_2\" style=\"width: 18%;\">From</div>";
      strValue += "<div class=\"Row_2_Fields_head_2\" style=\"width: 14%;\">Title</div>";
      strValue +=
          "<div class=\"Row_2_Fields_head_2\" style=\"width: 12%; text-align: left;\">Category</div>";
      strValue +=
          "<div class=\"Row_2_Fields_head_2\" style=\"width: 12%; text-align: left;\">Open Date</div>";
      strValue +=
          "<div class=\"Row_2_Fields_head_2\" style=\"width: 12%; text-align: left;\">Close Date</div>";
      strValue +=
          "<div class=\"Row_2_Fields_head_2\" style=\"width: 12%; text-align: left;\">Status</div>";
      strValue += "</div>";

      String strLoginIdSymbol =
          (strComFIdOrder.trim().equalsIgnoreCase("asc"))
              ? "<img style=\"cursor:hand\" src=\"../images/downarrow.gif\" onClick=\"retrieveClistURL('brandsExistingComplaint.do?sby=log.first_name&lowerSubTag="
                  + lowerSubTag
                  + "&pageid="
                  + pageid
                  + "&numMin="
                  + minVal
                  + "&fidorder="
                  + strComFIdOrder
                  + "');\">"
              : "<img style=\"cursor:hand\" src=\"../images/uparrow.gif\" onClick=\"retrieveClistURL('brandsExistingComplaint.do?sby=log.first_name&lowerSubTag="
                  + lowerSubTag
                  + "&pageid="
                  + pageid
                  + "&numMin="
                  + minVal
                  + "&fidorder="
                  + strComFIdOrder
                  + "');\">";
      String strUnameSymbol =
          (strCTitelOrder.trim().equalsIgnoreCase("asc"))
              ? "<img style=\"cursor:hand\" src=\"../images/downarrow.gif\" onClick=\"retrieveClistURL('brandsExistingComplaint.do?sby=com.complaint_title&lowerSubTag="
                  + lowerSubTag
                  + "&pageid="
                  + pageid
                  + "&numMin="
                  + minVal
                  + "&ctorder="
                  + strCTitelOrder
                  + "');\">"
              : "<img style=\"cursor:hand\" src=\"../images/uparrow.gif\" onClick=\"retrieveClistURL('brandsExistingComplaint.do?sby=com.complaint_title&lowerSubTag="
                  + lowerSubTag
                  + "&pageid="
                  + pageid
                  + "&numMin="
                  + minVal
                  + "&ctorder="
                  + strCTitelOrder
                  + "');\">";
      String strDateSymbol =
          (strDateOrder.trim().equalsIgnoreCase("asc"))
              ? "<img style=\"cursor:hand\" src=\"../images/downarrow.gif\" onClick=\"retrieveClistURL('brandsExistingComplaint.do?sby=com.creation_date&lowerSubTag="
                  + lowerSubTag
                  + "&pageid="
                  + pageid
                  + "&numMin="
                  + minVal
                  + "&dateorder="
                  + strDateOrder
                  + "');\">"
              : "<img style=\"cursor:hand\" src=\"../images/uparrow.gif\" onClick=\"retrieveClistURL('brandsExistingComplaint.do?sby=com.creation_date&lowerSubTag="
                  + lowerSubTag
                  + "&pageid="
                  + pageid
                  + "&numMin="
                  + minVal
                  + "&dateorder="
                  + strDateOrder
                  + "');\">";

      for (int i = 0; i < userVec.size(); i++) {
        int j = i + 1;
        int numTotal = j % 2;
        String strColor = (numTotal == 0) ? "#FFFFFF" : "#FFFFFF";
        String strImg = (numTotal == 0) ? "detail_white.gif" : "detail_white.gif";
        Vector tempVec = (Vector) userVec.elementAt(i);

        int comId = Integer.parseInt(tempVec.elementAt(0).toString().trim());

        String strFid = tempVec.elementAt(1).toString().trim();

        String strFname = tempVec.elementAt(6).toString().trim();
        String strLname = tempVec.elementAt(7).toString().trim();
        String strCompText = tempVec.elementAt(10).toString().trim();
        //	 String strCity = tempVec.elementAt(8).toString().trim();
        int catId = Integer.parseInt(tempVec.elementAt(8).toString().trim());
        int tagId = Integer.parseInt(tempVec.elementAt(9).toString().trim());
        int dealerId = Integer.parseInt(tempVec.elementAt(11).toString().trim());

        strColor = "#404040";
        if (tagId == 1) {
          strColor = "#990099";
        }
        if (tagId == 2) {
          strColor = "#999900";
        }
        if (tagId == 3) {
          strColor = "#00CC00";
        }
        if (tagId == 4) {
          strColor = "#B00000";
        }
        Vector catVec = rootMaster.getCategoryName(dataSource, catId);
        Vector tagVec = rootMaster.getTagName(dataSource, tagId);
        String Staff = "NA";
        if (dealerId != 0) {
          Vector StaffVec = rootMaster.getStaffName(dataSource, dealerId);
          System.out.println("staff is " + StaffVec);
          Staff = StaffVec.elementAt(0).toString().trim();
        }
        String cat_name = catVec.elementAt(0).toString().trim();
        String tagname = "";
        if (tagVec.size() == 0) {
          tagname = "NA";
        } else {
          tagname = tagVec.elementAt(0).toString().trim();
        }

        // for check length of Complaint text
        String strText = "";
        String strFMsg = "";

        String strMessage = tempVec.elementAt(2).toString().trim();
        //////// System.out.println("complaintMessage........."+strMessage.length());
        //////// System.out.println("complaintMessage........."+strMessage);
        int numChar = (strMessage.length() > 45) ? 45 : strMessage.length();
        for (int k = 0; k < numChar; k++) {

          strFMsg = strFMsg + strMessage.charAt(k);
        }
        if (strFMsg.lastIndexOf(strFMsg) != -1) {
          strText = strFMsg;
          ////// System.out.println("...strFMsgTeam......"+strFMsg.lastIndexOf(strFMsg));

        } else {
          strText = strFMsg.substring(0, strFMsg.lastIndexOf(" "));
          ////// System.out.println("...strText......");
        }
        String strDate[] = tempVec.elementAt(3).toString().trim().split("-");
        // starting to represent complaints listing here in different format
        strValue += "<div class=\"Fields_Row_2a\" style=\"font-size:11px; width:99%\">";
        strValue +=
            "<div class=\"Row_2_Fields_head_2\" style=\"width: 18%; font-weight: normal;\">"
                + strFname
                + " "
                + strLname
                + "</div>";
        strValue +=
            "<div class=\"Row_2_Fields_head_2\" style=\"width: 14%; font-weight: normal;\">"
                + strText
                + "</div>";
        strValue +=
            "<div class=\"Row_2_Fields_head_2\" style=\"width: 12%; font-weight: normal; text-align: left;\">"
                + cat_name
                + "</div>";
        strValue +=
            "<div class=\"Row_2_Fields_head_2\" style=\"width: 12%; font-size:9px; font-weight: normal; text-align: left;\">"
                + strDate[2]
                + "-"
                + strDate[1]
                + "-"
                + strDate[0]
                + "</div>";
        strValue +=
            "<div class=\"Row_2_Fields_head_2\" style=\"width: 12%; font-size:9px; font-weight: normal; text-align: left;\">"
                + strDate[2]
                + "-"
                + strDate[1]
                + "-"
                + strDate[0]
                + "</div>";
        strValue +=
            "<div class=\"Row_2_Fields_head_2\" style=\"width: 10%; font-size:9px; font-weight: bold; color: "
                + strColor
                + "; text-align: right;\">"
                + tagname
                + "</div>";
        //	    strValue += "<div class=\"Row_2_Fields_head_2\" style=\"width: 8%;\"
        // onclick=\"popup('popUpDiv')\"><a
        // href=\"compdetres.jsp?numCid="+numCid+"&pageid1="+pageid+"&lowerSubTag="+lowerSubTag+"\"><img alt=\"Click here to see detail\" src=\"../images/"+strImg.trim()+"\" width=\"16\" height=\"16\" border=\"0\"></img></a></div>";
        strValue +=
            "<div class=\"Row_2_Fields_head_2\"><img id=\"imgplus"
                + i
                + "\" style=\"cursor: pointer\" src=\"../images/add.png\" onclick=\"fnShow('imgplus"
                + i
                + "', 'compdet"
                + i
                + "', 'imgminus"
                + i
                + "');\"><img id=\"imgminus"
                + i
                + "\" style=\"display: none; cursor: pointer\" src=\"../images/add.png\" onclick=\"fnHide('imgplus"
                + i
                + "', 'compdet"
                + i
                + "', 'imgminus"
                + i
                + "');\"></div>";
        strValue += "</div>";
        strValue += "<div>";
        strValue += "<span id=\"compdet" + i + "\" style=\"display: none;\">";
        strValue += "<div class=\"top_panel-1\"  style =\"width:600px;\">";
        strValue += "<div class=\"Page_Heading-2\">";
        strValue += "<div class=\"Page_Heading_Text\" style=\"width: 70%;\">Details</div></div>";

        strValue += "<div class=\"Fields_Container-2\"  style =\"width:600px;\">";
        strValue += "<div class=\"Fields_Container_Inside\" >";
        strValue += "<div class=\"Fields_Row_1\">";
        strValue +=
            "<div style=\"float: left; width: 25%; text-align: left; margin-left: 25px; display: inline; font-weight: bold;\">Complaint Title:</div>";
        strValue +=
            "<div style=\"float: left; width: 60%; text-align: left; margin-left: 25px; display: inline; font-weight: normal;\">"
                + strText
                + "</div>";
        strValue += "</div>";

        strValue += "<div class=\"Fields_Row_1\">";
        strValue +=
            "<div style=\"float: left; width: 25%; text-align: left; margin-left: 25px; display: inline; font-weight: bold;\">From:</div>";
        strValue +=
            "<div style=\"float: left; width: 60%; text-align: left; margin-left: 25px; display: inline; font-weight: normal;\">"
                + strFname
                + " "
                + strLname
                + "</div>";
        strValue += "</div>";

        strValue += "<div class=\"Fields_Row_1\">";
        strValue +=
            "<div style=\"float: left; width: 15%; text-align: left; margin-left: 25px; display: inline; font-weight: bold;\">Category:</div>";
        strValue +=
            "<div style=\"float: left; width: 20%; text-align: left; margin-left: 25px; display: inline; font-weight: normal;\">"
                + cat_name
                + "</div>";
        strValue +=
            "<div style=\"float: left; width: 20%; text-align: left; margin-left: 25px; display: inline; font-weight: bold;\">Complaint ID:</div>";
        strValue +=
            "<div style=\"float: left; width: 20%; text-align: left; margin-left: 25px; display: inline; font-weight: normal;\">"
                + comId
                + "</div>";
        strValue += "</div>";

        strValue += "<div class=\"Fields_Row_1\">";
        strValue +=
            "<div style=\"float: left; width: 15%; text-align: left; margin-left: 25px; display: inline; font-weight: bold;\">Filed on:</div>";
        strValue +=
            "<div style=\"float: left; width: 20%; text-align: left; margin-left: 25px; display: inline; font-weight: normal;\">"
                + strDate[2]
                + "-"
                + strDate[1]
                + "-"
                + strDate[0]
                + "</div>";
        strValue +=
            "<div style=\"float: left; width: 20%; text-align: left; margin-left: 25px; display: inline; font-weight: bold;\">Assigned To:</div>";
        strValue +=
            "<div style=\"float: left; width: 20%; text-align: left; margin-left: 25px; display: inline; font-weight: normal;\">"
                + Staff
                + "</div>";
        strValue += "</div>";

        strValue += "<div class=\"Fields_Row_1\">";
        strValue +=
            "<div style=\"float: left; width: 25%; text-align: left; margin-left: 25px; display: inline; font-weight: bold;\">Complaint Details:</div>";
        strValue +=
            "<div style=\"float: left; width: 60%; text-align: left; margin-left: 25px; display: inline; font-weight: normal;\"><p>"
                + strCompText
                + "</p></div>";
        strValue += "</div>";

        strValue += "<div class=\"Fields_Row_1\">";
        strValue +=
            "<div style=\"float: left; width: 20%; text-align: left; margin-left: 25px; display: inline; font-weight: bold;\">Status:</div>";
        strValue +=
            "<div style=\"float: left; width: 25%; text-align: left; margin-left: 25px; display: inline; font-weight: normal;\">"
                + tagname
                + "</div>";
        strValue +=
            "<div style=\"float: left; width: 25%; text-align: left; margin-left: 25px; display: inline; font-weight: normal;\">Change Status to: </div>";
        strValue +=
            "<div style=\"float: left; width: 25%; text-align: left; margin-left: 25px; display: inline; font-weight: normal;\"><select name=\"status\" onchange=\"xyz.do?compid=comId&numStatus=this.value\">";
        strValue += "<option value=\"1\">Open</option>";
        strValue += "<option value=\"2\">Under Process</option>";
        strValue += "<option value=\"3\">Resolved</option>";
        strValue += "<option value=\"4\">Closed</option>";
        strValue += "</select></div>";
        strValue += "</div>";

        strValue += "</div></div>";

        strValue += "</div></span></div>";

        //	strValue += "</div>";
      }

      if (totalRow > maxVal) {
        strValue += "<tr >";
        strValue += "<td colspan=\"7\" align=\"right\" >Page Number" + strPageHtml + "</td>";
        strValue += "</tr>";
      }
      strValue += "</div></div>";
    }

    strValue += "</div>";

    strValue += "<div style=\"float:right;\">";
    // strValue +="<div class=\"Page_Heading\">";
    // strValue +="<div class=\"Page_Heading_Text\" style=\"width: 70%;\">Search
    // Criteria</div></div>";

    strValue +=
        "<div style=\"width:130px; float:left; border-left:solid 1px #ccc; margin-left:3px;\">";
    strValue +=
        "<span style=\"font-size:12px; font-weight:bold; text-align:center; width:90%; float:left;\">Category</span>";
    strValue += "<ul style=\"font-size:11px;\">";

    Vector CatVec = rootMaster.getAllCategory(dataSource);
    Vector tempCatVec = new Vector();
    for (int i = 1; i < CatVec.size() - 1; i++) {
      tempCatVec.add(CatVec.elementAt(i));
    }
    int tempInt = tempCatVec.size() / 10;
    int tempRest = tempCatVec.size() % 10;
    //		////////System.out.println("tempInt>>>>>>>>>"+tempInt);
    //		////////System.out.println("tempRest>>>>>>>>>"+tempRest);
    int y3 = 10;
    if (tempRest != 0) {
      tempInt += 1;
    }

    for (int k = 0; k < tempInt; k++, y3 += 10) {
      if (y3 > tempCatVec.size()) {
        if (tempRest != 0) {
          y3 = y3 + tempRest - 10;
        } else {
          y3 = tempCatVec.size();
        }
      }

      System.out.println("temp Vec at Brand Existing complaints " + tempCatVec);
      if (k == 0) {

        strValue += " <TR id=\"city" + k + "\" style=\"display:inline\">";
      } else {
        strValue += " <TR id=\"city" + k + "\" style=\"display:none\">";
      }
      strValue += " <TD colspan=\"2\"  align=\"left\" valign=\"top\">";
      if (k == 0) {
        // strValue +=" <A
        // href=\"searchresult.jsp?cityStr=&brandStr="+brand+"&categoryStr="+category+"\"><b
        // >ALL</b></A><BR>";
        // strValue +=" <><b>ALL</b></A><BR>";
        strValue +=
            "<li  style=\"padding:2px 5px;\"><A onclick=\"retrieveClistURL('brandsExistingComplaint.do?lowerSubTag="
                + lowerSubTag
                + "&pageid="
                + pageid
                + "&Month="
                + mon
                + "&Year="
                + nYr
                + "&categoryid=0&numCount=6');\" href=\"#\">ALL</li>";
      }
      for (int j = k * 10; j < y3; j++) {
        strValue +=
            "<li  style=\"padding:2px 5px;\"><A onclick=\"retrieveClistURL('brandsExistingComplaint.do?lowerSubTag="
                + lowerSubTag
                + "&pageid="
                + pageid
                + "&Month="
                + mon
                + "&Year="
                + nYr
                + "&categoryid="
                + ((Vector) tempCatVec.elementAt(j)).elementAt(0).toString().trim()
                + "&numCount=6');\" href=\"#\">"
                + ((Vector) tempCatVec.elementAt(j)).elementAt(1).toString().trim()
                + "</A></li>";
        //		strValue +=" <A
        // onclick=\"retrieveClistURL('brandsExistingComplaint.do?lowerSubTag="+lowerSubTag+"&pageid="+pageid+"&Month="+mon+"&Year="+nYr+"&categoryid="+((Vector)tempCatVec.elementAt(j)).elementAt(0).toString().trim()+"&numCount=6');\" href=\"#\"><b >"+((Vector)tempCatVec.elementAt(j)).elementAt(1).toString().trim()+"</b></A><BR>";

      }
    }
    strValue += "</ul>";
    strValue += "<span style=\"float:left; margin-left:5px; font-size:11px;\">Prev</span>";
    strValue += "<span style=\"float:right; margin-right:5px; font-size:11px;\">Next</span>";
    // strValue +="</div>";
    // strValue +=" <tr id=\"city\" style=\"display:none\"><td width=\"60\" align=\"center\"
    // id=\"Previous\" onclick=\"showCity(this.id,"+(tempInt-1)+")\"
    // style=\"cursor:hand\">Previous&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td
    // class=\"bold\"id=\"next\" onclick=\"showCity(this.id,"+(tempInt-1)+")\"
    // style=\"cursor:hand\">Next</td></tr>";

    strValue +=
        "<div style=\"width:130px; float:left; border-top:solid 1px #ccc; margin-top:10px; margin-left:3px;\">";
    strValue +=
        "<span style=\"font-size:12px; font-weight:bold; text-align:center; width:90%; float:left;\">Status</span>";
    strValue += "<ul style=\"font-size:11px;\">";
    strValue += " <tr><td ><b>Status not Availlable</b></A><BR></TD>";
    strValue += " </TR>";

    /*		Vector collegeVec = new Vector();
    	Vector collegeVecCom = new Vector();

    	if(cscVec.size()==6){

    	 collegeVec = rootMaster.getCollege(dataSource,cscVec.elementAt(1).toString(), cscVec.elementAt(3).toString(), cscVec.elementAt(5).toString());
    	 collegeVecCom = rootMaster.getCollegeCom(dataSource, cscVec.elementAt(1).toString(), cscVec.elementAt(3).toString(), cscVec.elementAt(5).toString());
    	}
    	else if(cscVec.size()==4){

    		collegeVec = rootMaster.getCollegeState(dataSource,cscVec.elementAt(1).toString(), cscVec.elementAt(3).toString());
    		 collegeVecCom = rootMaster.getCollegeComState(dataSource, cscVec.elementAt(1).toString(), cscVec.elementAt(3).toString());

    	}
    	else {

    		collegeVec = rootMaster.getCollegeCountry(dataSource,cscVec.elementAt(1).toString());
    		 collegeVecCom = rootMaster.getCollegeComCountry(dataSource, cscVec.elementAt(1).toString());

    	}
    */
    /*	Vector<Vector>brandVec = new Vector<Vector>();
    Vector<String>tempVec = new Vector<String>();

    for(int i=0;i<collegeVecCom.size();i++)
    {
    	Vector teamp = (Vector)collegeVecCom.elementAt(i);
    	Vector<String>teamp1 = new Vector<String>();

    	String teampId = teamp.elementAt(0).toString();

    	teamp1.add(teampId+"~1");
    	teamp1.add(teamp.elementAt(1).toString());

    	brandVec.add(teamp1);

    }

    for(int i=0;i<collegeVec.size();i++)
    {
    	Vector teamp = (Vector)collegeVec.elementAt(i);
    	Vector<String>teamp1 = new Vector<String>();

    	String teampId = teamp.elementAt(0).toString();

    	teamp1.add(teampId+"~0");
    	teamp1.add(teamp.elementAt(1).toString());

    	brandVec.add(teamp1);


    }
    */
    /*Vector tempBrandVec = new Vector();
    		if(brandVec.size()>0){
    			for(int i=0 ; i<brandVec.size();i++)
    			{
    				tempBrandVec.add(brandVec.elementAt(i));
    			}
    		int tempInt1 = tempBrandVec.size()/10;
    		int tempRest1 = tempBrandVec.size()%10;
    //		////////System.out.println("tempBrandVec.size()>>>>>>>>>"+tempBrandVec.size());
    //		////////System.out.println("tempInt1>>>>>>>>>"+tempInt1);
    //		////////System.out.println("tempRest1>>>>>>>>>"+tempRest1);
    		int y1 = 10;
    		if(tempRest1!=0)
    		{
    		tempInt1 += 1;
    		}*/
    /*
    		for(int k1=0;k1<tempInt1;k1++,y1+=10){
    		if(y1>tempBrandVec.size())
    		{
    			if(tempRest1!=0)
    			{
    				y1=y1+tempRest1-10;
    			}
    			else
    			{
    				y1=tempBrandVec.size();
    			}
    		}
    */
    /*	if(k1==0){


    		strValue +=" <TR id=\"brand"+k1+"\" style=\"display:inline\">";
    		}else{
    		strValue +=" <TR id=\"brand"+k1+"\" style=\"display:none\">";
    		}
    		strValue +=" <TD colspan=\"2\"  align=\"left\" valign=\"top\">";
    		if(k1==0){
    		strValue +=" <A href=\"searchresult.jsp?cityStr=0&brandStr=&categoryStr="+category+"\"></A><BR>";
    		}
    		for(int j1=k1*10;j1<y1;j1++){
    //		////////System.out.println(k+">>>>>>>>>>>>>>>>>>"+tempCityVec.elementAt(j).toString());




    		Vector tempBrandVec1 = (Vector)tempBrandVec.elementAt(j1);

    		strValue +=" <A href=\"searchresult.jsp?cityStr=0&brandStr="+tempBrandVec1.elementAt(0).toString()+"&categoryStr="+category+"\"><b >"+tempBrandVec1.elementAt(1).toString()+"</b></A><BR>";



    		} +=" </TD>";
    		strValue +=" </TR>";
    	}*/
    /*	if(tempBrandVec.size()>10)
    		{


    		strValue +=" <tr id=\"brandnext\" style=\"display:inline\"><td width=\"60\"></td><td  align=\"right\"  id=\"next\" onclick=\"showBrand(this.id,"+(tempInt1-1)+")\" style=\"cursor:hand\">Next</td></tr>";
    		strValue +=" <tr id=\"brand\" style=\"display:none\"><td width=\"60\" align=\"center\"  id=\"Previous\" onclick=\"showBrand(this.id,"+(tempInt1-1)+")\" style=\"cursor:hand\">Previous&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td><td  class=\"bold\"id=\"next\" onclick=\"showBrand(this.id,"+(tempInt1-1)+")\" style=\"cursor:hand\">Next</td></tr>";
    		strValue +=" <tr id=\"brandpre\" style=\"display:none\"><td width=\"60\" align=\"left\"  id=\"Previous\" onclick=\"showBrand(this.id,"+(tempInt1-1)+")\" style=\"cursor:hand\">Previous</td><td></td></tr>";

    		}}else{
    		strValue +=" <tr><td ><b>No College Availlable</b><BR></TD>";
    		strValue +=" </TR>";
    		}
    */

    strValue += " </TBODY>";
    strValue += " </TABLE>";
    strValue += " </TD>";
    strValue += " </TR>";
    strValue += " <TR>";
    strValue += " <TD background=blogs_files/1x1white.gif></TD>";
    strValue += " </TR>";
    strValue += " </TBODY>";
    strValue += " </TABLE>";
    strValue += " </TD>";
    strValue += " </TR>";

    strValue += " <TR>";
    strValue += " <TD><TABLE cellSpacing=0 cellPadding=0 width=\"100%\" border=0>";
    strValue += " <TBODY>";
    strValue += " <TD background=blogs_files/1x1white.gif></TD></TR>";
    strValue += " <TR>";
    strValue += "  <TD>";
    strValue += " <TABLE cellSpacing=0 cellPadding=0 width=\"95%\" align=center border=0>";
    strValue += " <TBODY>";

    // Vector categoryVec = rootMaster.getCategories(dataSource);
    Vector<Vector> resultVec = new Vector<Vector>();

    resultVec = rootMaster.getCourse(dataSource);

    Vector tempCategoryVec = new Vector();
    if (resultVec.size() > 0) {
      for (int i = 1; i < resultVec.size(); i++) {
        tempCategoryVec.add(resultVec.elementAt(i));
      }
      int tempInt2 = tempCategoryVec.size() / 10;
      int tempRest2 = tempCategoryVec.size() % 10;
      int y2 = 10;
      if (tempRest2 != 0) {
        tempInt2 += 1;
      }

      for (int k2 = 0; k2 < tempInt2; k2++, y2 += 10) {
        if (y2 > tempCategoryVec.size()) {
          if (tempRest2 != 0) {
            y2 = y2 + tempRest2 - 10;
          } else {
            y2 = tempCategoryVec.size();
          }
        }
        /*
        		if(k2==0){


        		strValue +=" <TR id=\"category"+k2+"\" style=\"display:inline\">";
        		}else{
        		strValue +=" <TR id=\"category"+k2+"\" style=\"display:none\">";
        		}
        		strValue +=" <TD colspan=\"2\" align=\"left\" valign=\"top\">";
        		if(k2==0){
        		strValue +="  <A href=\"searchresult.jsp?cityStr=0&brandStr="+brand+"&categoryStr=\"></A><BR>";
        		}
        		for(int j2=k2*10;j2<y2;j2++){
        //		////////System.out.println(k+">>>>>>>>>>>>>>>>>>"+tempCityVec.elementAt(j).toString());


        		Vector tempCat = (Vector)tempCategoryVec.elementAt(j2);

        		strValue +=" <A href=\"searchresult.jsp?cityStr=0&brandStr="+brand+"&categoryStr="+tempCat.elementAt(0).toString()+"\"><b >"+tempCat.elementAt(1).toString()+"</b></A><BR>";



        		}*/
        strValue += " </TD>";
        strValue += " </TR>";
      }

      strValue += " </TBODY>";
      strValue += " </TABLE>";
      strValue += " </TD>";
      strValue += " </TR>";
      strValue += " <TR>";
      strValue += "  <TD height=\"2\" background=blogs_files/1x1white.gif></TD>";
      strValue +=
          "  </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>";
      strValue += " <TD width=6></TD>";
      strValue += "  </TR>";

      strValue += "  <TR>";
      strValue += " <TD height=\"2\" colSpan=4></TD>";
      strValue += " </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>";
      strValue += " <TD width=4></TD>";
      strValue +=
          " </TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR>";
      strValue +=
          " </TBODY></TABLE>                              </TD></TR></TBODY></TABLE></TD></TR>";
      strValue +=
          " </TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>";
      strValue += "  </div>  </div>";
      strValue += "    </div>";
    }
    strValue += "    </div>";
    return strValue;
  }
  /**
   * Method execute
   *
   * @param mapping
   * @param form
   * @param request
   * @param response
   * @return ActionForward
   */
  public ActionForward execute(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {
    HttpSession session = request.getSession();
    //	System.out.println("checkpoint13");
    String numCount = (String) session.getAttribute("numCount");

    int count = Integer.parseInt(numCount);
    int remander = count % 2;
    System.out.println("checkpoint at corpo 2");
    AdvtMaster advtMaster = new AdvtMaster();
    RootMaster rootMaster = new RootMaster();
    IndvMaster indvMaster = new IndvMaster();

    String uId = (String) session.getAttribute("uId");
    String compId = (String) session.getAttribute("compId");

    System.out.println("compId..in Action avdt ........." + compId);
    //	int regFlag= rootMaster.getRegisteredFlag(getDataSource(request, "corpo"), compId);
    //	System.out.println("regFlag..in Action avdt ........."+regFlag);

    Vector allRights = (Vector) session.getAttribute("allRights");
    String adminFlag = allRights.elementAt(18).toString();

    //	 System.out.println("checkpoint at corpo 3");

    String pageid =
        (request.getParameter("pageid") != null) ? request.getParameter("pageid").trim() : "1";
    String aType =
        (request.getParameter("aType") != null) ? request.getParameter("aType").trim() : "0";
    String lowerSubTag =
        (request.getParameter("lowerSubTag") != null)
            ? request.getParameter("lowerSubTag").trim()
            : "1";
    String categoryid =
        (request.getParameter("categoryid") != null)
            ? request.getParameter("categoryid").trim()
            : "0";

    //	System.out.println("lowerSubTag..in Action avdt ........."+lowerSubTag);
    java.util.Date dt = new java.util.Date();
    SimpleDateFormat sform = new SimpleDateFormat("yyyy-MM-dd");
    String completeRemDate = sform.format(dt);
    StringTokenizer sttotal = new StringTokenizer(completeRemDate, ",");
    String creationDate = sttotal.nextToken();
    String dateToday[] = creationDate.split("-");
    String YR = dateToday[0];
    String DaY = dateToday[2];
    String MTH = dateToday[1];

    String month = (request.getParameter("Month") != null) ? request.getParameter("Month") : MTH;
    String nYear = (request.getParameter("Year") != null) ? request.getParameter("Year") : YR;

    System.out.println("month and yesar" + month + " " + nYear);
    String strShortBy =
        (request.getParameter("sby") != null) ? request.getParameter("sby") : "creation_date";
    String strSOrder = "";
    String strComFIdOrder = "asc";
    String strCTitelOrder = "asc";
    String strDateOrder = "asc";

    if (request.getParameter("sby") != null) {
      if (request.getParameter("fidorder") != null) {
        if (request.getParameter("fidorder").trim().equalsIgnoreCase("asc")) {
          strSOrder = "desc";
          strComFIdOrder = "desc";
        } else if (request.getParameter("fidorder").trim().equalsIgnoreCase("desc")) {
          strSOrder = "asc";
          strComFIdOrder = "asc";
        }
      }

      if (request.getParameter("ctorder") != null) {
        if (request.getParameter("ctorder").trim().equalsIgnoreCase("asc")) {
          strSOrder = "desc";
          strCTitelOrder = "desc";
        } else if (request.getParameter("ctorder").trim().equalsIgnoreCase("desc")) {
          strSOrder = "asc";
          strCTitelOrder = "asc";
        }
      }
      if (request.getParameter("dateorder") != null) {
        if (request.getParameter("dateorder").trim().equalsIgnoreCase("asc")) {
          strSOrder = "desc";
          strDateOrder = "desc";
        } else if (request.getParameter("dateorder").trim().equalsIgnoreCase("desc")) {
          strSOrder = "asc";
          strDateOrder = "asc";
        }
      }
    }
    String strFShortBy = strShortBy + " " + strSOrder;
    int minVal =
        (request.getParameter("numMin") != null)
            ? Integer.parseInt(request.getParameter("numMin"))
            : 0;
    int maxVal = 10;
    //// System.out.println("countVec.............InboxAction......minVal..... "+minVal);
    //// System.out.println("countVec.............InboxAction......maxVal..... "+maxVal);

    Vector<String> paramVec1 = new Vector<String>();
    paramVec1.add(uId);
    paramVec1.add(compId);
    paramVec1.add(adminFlag);
    paramVec1.add(pageid);

    Vector<String> paramVec = new Vector<String>();
    paramVec.add(String.valueOf(minVal));
    paramVec.add(String.valueOf(maxVal));
    paramVec.add(strFShortBy);
    paramVec.add(uId);
    paramVec.add(compId);
    paramVec.add(adminFlag);
    paramVec.add(pageid);

    int Cid = Integer.parseInt(compId);
    int Uid = Integer.parseInt(uId);
    int aFid = Integer.parseInt(adminFlag);

    Vector comVec = new Vector();
    Vector comListVec = new Vector();
    String comList = "";

    paramVec1.add("0");
    paramVec.add("0");

    ////// System.out.println("comList................on page."+comList);
    int totalRow = 0;
    paramVec1.add(lowerSubTag);
    paramVec1.add(categoryid);
    paramVec1.add(month);
    paramVec1.add(nYear);

    paramVec.add(lowerSubTag);
    paramVec.add(categoryid);
    paramVec.add(month);
    paramVec.add(nYear);
    totalRow = advtMaster.getComplaintCountL(getDataSource(request, "corpo"), paramVec1);
    Vector UserVec = advtMaster.getBrandComplaintList1L(getDataSource(request, "corpo"), paramVec);

    String country = "", state = "", city = "", brand = "", category = "", firstName = "";

    String countryName = "", stateName = "", cityName = "", brandName = "", categoryName = "";
    String searchFor = "";
    DataSource dataSource = getDataSource(request, "corpo");

    Vector userVec = (Vector) session.getAttribute("userVec");
    Vector cscVec = (Vector) session.getAttribute("cscVec");
    cscVec = userVec;
    Vector userTempVec = new Vector();
    if (session.getAttribute("userVec") != null) {
      userTempVec = (Vector) session.getAttribute("userVec");
      for (int i = 0; i < userTempVec.size(); i++) {
        if (userTempVec.elementAt(i).toString().equals("city =")) {
          city = userTempVec.elementAt(i + 1).toString().trim();
          cityName = rootMaster.getPlaceName(dataSource, Integer.parseInt(city));
          break;
        }
      }
    }
    Vector searchVec = new Vector();

    /*
     *  searchFor (0) Student.
     */

    if (searchFor.equalsIgnoreCase("0")) {
      if (session.getAttribute("searchVec") != null) {
        searchVec = (Vector) session.getAttribute("searchVec");
        for (int i = 0; i < searchVec.size(); i++) {
          paramVec.add(searchVec.elementAt(i).toString());
          if (searchVec.elementAt(i).toString().equals("course =")) {
            category = searchVec.elementAt(i + 1).toString().trim();
            Vector categoryNameVec =
                indvMaster.getCourseName(dataSource, Integer.parseInt(category.trim()));
            categoryName = categoryNameVec.elementAt(0).toString();
          }
          if (searchVec.elementAt(i).toString().equals("first_name like")) {
            firstName = searchVec.elementAt(i + 1).toString().trim();

            String teamCat1[] = firstName.split("%");
            ////////// System.out.println("teamCat[]>>>>>>>searchVec>>>>>>>"+teamCat1[1]);
            firstName = teamCat1[1];
          }
          if (searchVec.elementAt(i).toString().equals("college_id =")) {
            brand = searchVec.elementAt(i + 1).toString().trim();

            String StrArr[] = brand.split("~");
            int compnyid = Integer.parseInt(StrArr[0]);

            if (compnyid == 0) {
              compnyid = Integer.parseInt(userVec.elementAt(27).toString());
              Vector name = indvMaster.getOtherCollege(dataSource, compnyid);
              brandName = name.elementAt(0).toString().trim();
            } else if (StrArr[1].equalsIgnoreCase("1")) {
              brandName = rootMaster.getCompnyName(dataSource, compnyid);
            } else {
              brandName = rootMaster.getCollegeName(dataSource, compnyid);
            }
            // brandName

          }
        }
      }
      if (session.getAttribute("userVec") != null) {
        for (int i = 0; i < userVec.size(); i++) {
          paramVec.add(userVec.elementAt(i).toString());
        }
      }
    }

    String strPageHtml = getPages(minVal, maxVal, totalRow, lowerSubTag, pageid, numCount);

    int regFlag = 0;
    int numcount = UserVec.size();
    String strComplaintList =
        getComplaintList(
            searchFor,
            dataSource,
            numcount,
            strComFIdOrder,
            strCTitelOrder,
            strDateOrder,
            minVal,
            maxVal,
            totalRow,
            strPageHtml,
            UserVec,
            pageid,
            lowerSubTag,
            regFlag,
            city,
            brand,
            categoryName,
            cityName,
            brandName,
            remander,
            firstName,
            month,
            nYear);
    // System.out.println("Users "+strComplaintList);
    /**
     * setContentType - text/html to write String on page. PrintWriter - This line use to get writer
     * to write on page. out.println - use to write string.
     */
    response.setContentType("text/html;charset=ISO-8859-1");
    PrintWriter out = response.getWriter();
    out.println(strComplaintList);
    out.flush();

    // TODO Auto-generated method stub
    return null;
  }
  public ActionForward execute(
      ActionMapping mapping,
      ActionForm form,
      HttpServletRequest request,
      HttpServletResponse response)
      throws Exception {

    MyPreferencesForm myPreferencesForm = new MyPreferencesForm();

    HttpSession session = request.getSession();
    String uId = (String) session.getAttribute("uId");
    String compId = (String) session.getAttribute("compId");

    int numCompId = Integer.parseInt(compId);
    int numUId = Integer.parseInt(uId);

    EntpMaster entpMaster = new EntpMaster();
    RootMaster rootMaster = new RootMaster();

    Vector resultVec = entpMaster.getCommunityUnnamedMap(getDataSource(request, "indv"), numCompId);
    request.setAttribute("resultVec", resultVec);
    System.out.println("resultVec//////MyPreferencesPreAction////////" + resultVec);

    Vector consumerUnName = new Vector();
    if (resultVec.size() != 0) {

      consumerUnName =
          rootMaster.getUserUnNameInfo(getDataSource(request, "indv"), numUId, numCompId);
      request.setAttribute("consumerUnName", consumerUnName);
      System.out.println("consumerUnName//////MyPreferencesPreAction////////" + consumerUnName);

      if (consumerUnName.size() != 0) {
        myPreferencesForm.setField1(consumerUnName.elementAt(0).toString());
        myPreferencesForm.setField2(consumerUnName.elementAt(1).toString());
        myPreferencesForm.setField3(consumerUnName.elementAt(2).toString());
        myPreferencesForm.setField4(consumerUnName.elementAt(3).toString());
        myPreferencesForm.setField5(consumerUnName.elementAt(4).toString());
        myPreferencesForm.setField6(consumerUnName.elementAt(5).toString());
        myPreferencesForm.setField7(consumerUnName.elementAt(6).toString());
        myPreferencesForm.setField8(consumerUnName.elementAt(7).toString());
        myPreferencesForm.setField9(consumerUnName.elementAt(8).toString());
        myPreferencesForm.setField10(consumerUnName.elementAt(9).toString());
        myPreferencesForm.setField11(consumerUnName.elementAt(10).toString());
        myPreferencesForm.setField12(consumerUnName.elementAt(11).toString());
        myPreferencesForm.setField13(consumerUnName.elementAt(12).toString());
        myPreferencesForm.setField14(consumerUnName.elementAt(13).toString());
        myPreferencesForm.setField15(consumerUnName.elementAt(14).toString());
        myPreferencesForm.setField16(consumerUnName.elementAt(15).toString());
        myPreferencesForm.setField17(consumerUnName.elementAt(16).toString());
        myPreferencesForm.setField18(consumerUnName.elementAt(17).toString());
        myPreferencesForm.setField19(consumerUnName.elementAt(18).toString());
        myPreferencesForm.setField20(consumerUnName.elementAt(19).toString());
        myPreferencesForm.setField21(consumerUnName.elementAt(20).toString());
        myPreferencesForm.setField22(consumerUnName.elementAt(21).toString());
        myPreferencesForm.setField23(consumerUnName.elementAt(22).toString());
        myPreferencesForm.setField24(consumerUnName.elementAt(23).toString());
        myPreferencesForm.setField25(consumerUnName.elementAt(24).toString());
        myPreferencesForm.setField26(consumerUnName.elementAt(25).toString());
        myPreferencesForm.setField27(consumerUnName.elementAt(26).toString());
        myPreferencesForm.setField28(consumerUnName.elementAt(27).toString());
        myPreferencesForm.setField29(consumerUnName.elementAt(28).toString());
        myPreferencesForm.setField30(consumerUnName.elementAt(29).toString());
        myPreferencesForm.setField31(consumerUnName.elementAt(30).toString());
        myPreferencesForm.setField32(consumerUnName.elementAt(31).toString());
        myPreferencesForm.setField33(consumerUnName.elementAt(32).toString());
        myPreferencesForm.setField34(consumerUnName.elementAt(33).toString());
        myPreferencesForm.setField35(consumerUnName.elementAt(34).toString());
      }
    }
    request.setAttribute("indvMyPreferencesForm", myPreferencesForm);
    return mapping.findForward("success");
  }