persistence@glassfish.java.net

RE: passing the value of data from DB to a servlet checkbox.

From: Eve Pokua <gorgeous65_at_msn.com>
Date: Mon, 14 May 2007 16:29:35 +0100

Hello everyone,

I have resolved this issue. I had the for Loop closed before the
System.out.printlin. So it
was not printing the value. Thanks for all your help. Sorry to bother you
all as well.

Thanks

eve

>From: "Eve Pokua" <gorgeous65_at_msn.com>
>Reply-To: ejb_at_glassfish.dev.java.net
>To: ejb_at_glassfish.dev.java.net, persistence_at_glassfish.dev.java.net
>Subject: passing the value of data from DB to a servlet checkbox.
>Date: Sun, 13 May 2007 16:53:18 +0100
>
>Hello,
>
>I am collecting data from a DB and displaying it to a user as below:
>
>
>for(Iteamdetailhlp itemlist: iteamdetailhlp){
> //String s=itemlist.getitmid();
> out.println("<TR>");
> out.println("<form method='get'
>action='AllItemsser'>");
> out.println("<td>");out.println("<input
>type='checkbox' name='itemcd' value=>"+
>itemlist.getitmid());out.println("</td>");
>
>out.println("<td>");out.println(
>itemlist.getitmname());out.println("</td>");
>
>out.println("<td>");out.println(itemlist.getdescription());out.println("</td>");
>
>out.println("<td>");out.println(itemlist.getitemsize());out.println("</td>");
>
>out.println("<td>");out.println(itemlist.getcolour());out.println("</td>");
>
>out.println("<td>");out.println(itemlist.getprice());out.println("</td>");
> out.println("</td>");}
> out.println("<input
>type='Submit' value='itm' name='itm'/>");
>
> String
>itmcod=request.getParameter("itemcd");
> out.println(itmcod);
> System.out.println(itmcod);
>
>
>
>When the user checks the checkbox,
>
>out.println("<td>");out.println("<input type='checkbox' name='itemcd'
>value=>"+ itemlist.getitmid());out.println("</td>");
>
>the value is collected and displayed as below:
>
> String itmcod=request.getParameter("itemcd");
> out.println(itmcod);
> System.out.println(itmcod);
>
>
>But I get the a null value.
>
>Please, could you point me out to the right direction.
>
>_________________________________________________________________
>The next generation of Hotmail is here! http://www.newhotmail.co.uk/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>

_________________________________________________________________
Play your part in making history - Email Britain!
http://www.emailbritain.co.uk/