I create a ArrayList which is put into a hashtable.
I build the following information:
ArrayList
Key: QuestionNumber as a string
Value: QuestionLabel as a string

The arraylist is put in the hashtable with the key as QuestionId as a Integer

I get an error with:

<Jun 6, 2003 7:25:17 AM PDT> <Error> <HTTP> <[WebAppServletContext
(2566529,triad-financial,/triad-financial)] Servlet failed with Exception
java.lang.ClassCastException: java.util.Hashtable$Entry
        at jsp_servlet._survey.__survey_admin._jspService
(__survey_admin.java:218)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:262)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:321)
        at weblogic.servlet.internal.ServletStubImpl.invokeServlet
(ServletStubImpl.java:198)
        at weblogic.servlet.internal.WebAppServletContext.invokeServlet
(WebAppServletContext.java:2678)
        at weblogic.servlet.internal.ServletRequestImpl.execute
(ServletRequestImpl.java:2412)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:140)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:121)

If I put QuestionId as a string it works greate it just the sorting is off:

like: 3, 23, 22, 2, 1 that is why i try to sort it as a Integer

Here is the jsp code:

                                        <logic:iterate id="qlId" 
name="questionLists" indexId="index" type="java.lang.Integer">
                                        
                                                <logic:iterate id="listId" 
name="qlId" property="value" type="java.lang.String">                           
                                                                                
                                                
                                                        <tr bgcolor="#CCCCCC">
                                                                <bean:define 
id="a" name="listId"/>
                                                                
                                                                <td 
class="text" align="center" width="46">
                                                                
        <html:multibox property="questionOption" >
                                                                        
        <bean:write name="qlId" property="key"/>
                                                                
        </html:multibox>
                                                                </td>
                                                                <td 
class="text" align="center" width="31">
                                                                
        <bean:write name="a" property="label" />
                                                                </td>
                                                                <td 
class="text" align="left" width="498">
                                                                
        <bean:write name="a" property="value" />
                                                                </td>
                                                        </tr>
                                                        <tr bgcolor="#e2f5f2">
                                                                <td 
colspan="3"/>
                                                        </tr>
                                                        
                                                </logic:iterate>
                                        </logic:iterate>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to