How to correct format of the output

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • madhuriks
    New Member
    • Jun 2010
    • 149

    How to correct format of the output

    hi,
    i developed on XML file..using DOM..i m getting the values the problem is im not getting the required format...can anyone suggest me..i used jsp page to enter the values in XML file...in my jsp page i used check-boxes and text-boxes..if i click check box and enter the value in text-box...if i clicked one checkbox and i need to get as 'F,10:' and if i enter 2 check boxes i need to get the output as 'F,10:A,5:' and the following is my java code..can anyone help me out...

    Code:
    String[] balrdys = request.getParameterValues("balrdys");
            String balrdysStr = "";
            StringBuffer sb = new StringBuffer();
            String s = ":";
            String F[] = request.getParameterValues("balrdys");
            String Fdays = request.getParameter("balrdys");
            String Adays = request.getParameter("balrdys");
            for (int i = 0; i < balrdys.length; i++) {
            if (balrdysStr == null) {
            balrdysStr += balrdys[i];
            } else {
            balrdysStr += balrdys[i]+ ":";
            }
            }
    i m getting the output as


    ' F,F,:
    F,F,:10F,: '



    waiting for the reply..
Working...