Hey frnd , thank you very much again for yor reply and valuable suggestion"I should go through the book again."u r right and i have started to refer it again.
yor reply is right but,still i am in doubt.
Frankly speaking i am converting a servlet page developed by another person-into mvc form ,and also i am quite new in this area, i am not able to solve this problem .
My actual code of servlet is i m writing below, so if possible pls suggest me suitable solution.
Thanks for the help,man.
out.println("<script language=\"javascript1.1\" type=\"text/javascript\">");
try{
pstmt = conn.createStatement();
rset=pstmt.executeQuery(qryStr);
boolean first = true;
while(rset.next()){
String p1 = rset.getString(1);//product
String p2=rset.getString(2);//family
String p3 = rset.getString(3);//price
if(p1==null) p1="";
else p1=p1.trim();
if(p2==null) p2="";
else p2=p2.trim();
if(p3==null) p3="";
else p3=p3.trim();
if(first){
first = false;
out.println("var elist = new Array(\""+p2+"*"+p3+"^"+p1+"\"");
}else{
out.println(",\""+p2+"*"+p3+"^"+p1+"\"");
}
}
if(first)
out.println("var elist=new Array(\"c*c^c\"");
out.println(")");
I have created respective dao and vo methods ,so see it in that context.So pls suggest me how i hsould proceed ,as again the lst solution u mentioned , i m finding it unsuitable in above concept.
Also i m doubting several things
like can i use <logic:iterate> tag inside <script></script> tags,
as i m getting error for it.
}
}
}