Java Help - Am I on the right track using JSP

Displaying data all in ONE jsp page

Page 1 of 1

0 Replies - 383 Views - Last Post: 25 February 2010 - 07:23 AM Rate Topic: -----

#1 bigz008  Icon User is offline

  • New D.I.C Head

Reputation: -1
  • View blog
  • Posts: 38
  • Joined: 17-September 09

Java Help - Am I on the right track using JSP

Posted 25 February 2010 - 07:23 AM

Hi, I'm a beginner in Jsp and Java, and I was excpected to display values from within this JSP onto the jsp page itself. Please I am really confused, I have the basic initializing and try/catch statement, I just know how these things work together, and is there anything missing? Thanks in advance.

<%        String     skuID="value1" 
          String     organisationID="value2"
          String     length="value3"
	  String     amount="value4"
	  String     active="value5"
	  String     trialPeriod="value6"
	  String     description="value7"
	  String     promoText="value8"
	  String     promoMinutes="value9" %>
<html>
<table>
<% Result [][] = skuCRUD.getRecord(all);
for (int i = 0; i < results.length; i++) {
result[i][0] = skuID
result[i][1] = organisationID;
result[i][2] = length;
result[i][3] = amount;
result[i][4] = active;
result[i][5] = trialPeriod;
result[i][6] = description;
result[i][7] = promoText;
result[i][8] = promoMinutes;
%> 

<TD> <%= skuID %></TD>
<TD> <%= organisationID %></TD>
<TD> <%= length %></TD>
<TD> <%= amount %></TD>
<TD> <%= active %></TD>
<TD> <%= trialPeriod %></TD>
<TD> <%= description %></TD>
<TD> <%= promoText %></TD>
<TD> <%= promoMinutes %></TD>

		   
<% try {    
            CRUD skuCrud = new CRUD ("sku", "skuID");
            
            String[] fields = {"skuID", "organisationID",
            "length", "amount", "active",
            "trialPeriod", "description", "promoText", "promoMinutes"}; 

            String[][] results = orgCrud.getRecords(fields, sortBy, orderBy, perPage ,currentPage);

            ArrayList<Sku> skuList = new ArrayList<Sku>(); } catch (Exception e) { System.out.println("Unable to execute "+sku+": "+e.getMessage()); } 

%>		   
		   
		   <%
    out.println(skuCrud);
    %>



Thanks

Is This A Good Question/Topic? 0
  • +

Page 1 of 1