mrityunjay22 0 Newbie Poster
        String  description = "";
        String query1 = "";
        int grade_autoid,count=0;
        rSet1= DBHelper.getQueryResult(query);

                %>

                 <tr>

                     <td>

                        <%
                          Log.log("rset value is as"+rSet1);
                          for(int i=1;i<rSet1.size();i++)
                        {
                          count++;
                        grade_name = ((String)((Vector)rSet1.elementAt(i)).elementAt(0));
                            grade_autoid=((Integer)((Vector)rSet1.elementAt(i)).elementAt(1)).intValue();%>
                           <% Log.log("gradeautoid is as" +grade_autoid); %>
                           <%  query1="select description from RUBRICS where grade_autoid="+grade_autoid;
                              Log.log("query1 is as "+query);
                               rSet2= DBHelper.getQueryResult(query1);
                               Log.log("the size of rSet2 is as "+rSet2.size());
                               if(rSet2.size()>1)
                                  {
                                     description = ((String)((Vector)rSet2.elementAt(1)).elementAt(0));
                                  }
                               else
                                 description = "";
                               Log.log("value of description is as "+description); %>
                          <tr>
                          <input type='hidden' name='grade_autoid<%=i%>' value=<%=grade_autoid%>>
                           <td width="20" align="center"><%=(i)%></td>
                            <td width="150" align="Left"><%=grade_name%></td>

                           <td><input type="text" name=description<%=i%> value="<%=description%>"></td>
                           </tr>

                     <%}%>

                 </td>
              </tr>

<tr>
     <td align = "center" colspan="3" align="Center">
       <INPUT type="submit" value="Submit">
       <input type=hidden name=count value=<%=count%>>
        <input type=hidden name=class_id value=<%=class_id%>>

     </td>
</tr>
</BODY>
</HTML>

i am getting classcastexception in the line

        description = ((String)((Vector)rSet2.elementAt(1)).elementAt(0));

plz help me as soon as possible

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.