tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Isak Rickyanto" <is...@telkom.net>
Subject Iterator.next to String
Date Thu, 25 Oct 2001 16:19:16 GMT
Hello all of Java Gurus.......

I use iterator  in my code
and I have succeeded to display the iterator.next() in the browser

but I want to pass it to next jsp, so I want to get the value of
iterator.next and convert to String variable

I try String title=(String)iterator.next(); but I found error .....

I am new to Java so I still confused about these....
Please help me to get value of iterator.next() to String variabel so I can
pass it as input with hidden type
to next jsp.

The codes is like these :

<TABLE width="80%">
    <tr bgcolor="lightgrey"><td>Title</td><td>Units</td></tr>
<%
    Iterator iterator = cart.iterator();
    while (iterator.hasNext())
    {
    %>
     <tr>
    <td>
    <%=iterator.next()%>
    </td>
    <td>
    <input type="text" name="jumlah" value="1">
    </td>
    </tr>
    <%
    }
    %>
    </table>



--
To unsubscribe, e-mail:  <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message