Hi guys, I've created a .jsp page which gets all the records I put in the database (from mySQL Query browser) and displays them in a table.
*The CRUD file is where I connect to the db....Code:<html> <table style="width: 100%" class="style4" cellspacing="1" cellpadding="3"> <tr> <td style="width: 90px" id="tableheadercell" class="style3"> <strong>Organsation ID</strong></td> <td style="width: 50px" id="tableheadercell" class="style3"> <strong>Length</strong></td> <td style="width: 50px" id="tableheadercell" class="style3"> <strong>Amount</strong></td> <td style="width: 80px" id="tableheadercell" class="style3"> <strong>Trial Period</strong></td> <td style="width: 90px" id="tableheadercell" class="style3"> <strong>Promo Minutes</strong></td> </tr> <% String skuResult[][]; skuResult = null; try { String [] skuFields = {"orgID", "length", "amount", "trial_period", "promoMins"}; CRUD skuCRUD = new CRUD ("sku", "skuID"); skuResult = skuCRUD.getRecords(skuFields,0,0); } catch (Exception e) { Tracer.logERROR("[sku/skuContent.jsp] "+e); e.printStackTrace(); } String skuID=""; String organisationID=""; String cc_flag=""; String length=""; String amount=""; String active=""; String trialPeriod=""; String description=""; String promoText=""; String promoMinutes=""; for (int i = 0; i < skuResult.length; i++) { organisationID = skuResult[i][0]; length = skuResult[i][1] ; amount = skuResult[i][2]; trialPeriod = skuResult[i][3]; promoMinutes = skuResult[i][4]; %> <tr> <td style="width: 90px" class="ms-list1-0001-odd"><%= organisationID %></td> <td style="width: 50px" class="ms-list1-0001-odd"><%= length %></td> <td style="width: 50px" class="ms-list1-0001-odd"><%= amount %></td> <td style="width: 80px" class="ms-list1-0001-odd"><%= trialPeriod %></td> <td style="width: 90px" class="ms-list1-0001-odd"><%= promoMinutes %></td> </tr> <% Tracer.logERROR("[sku/skContent.jsp] "+"errors are after this"); } %> </table> </html>
How can I add the functionality to add/delete the records from within my .jsp code?
Thanks in advance.
i donno much on JSp but are there controls to present data like what .NET has,because .net controls provide functionality to add ,delete,update on the fly![]()
Yea, I guess I can try opening the .jsp file with another program which contains those controls like Microsoft Expression Web2...
Thanks.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks