can someone help me

my output is as follows:   the last line has the title but no data
************************************************************************************
response.jsp Page
Hello, derez lusk

Richard Montreal QC H3J 9R9 no home phone specified
Mikita Chicago IL 65982 (320)876-9784
Gilbert New-York City NY 19432 no home phone specified
Howe Detroit MG 07685 (465)675-0761
Sawchuk Toronto ON M5C 1Z1 no home phone specified
firstName and lastName:
*************************************************************************************
Code:
Response.jsp

<c:forEach var="customer" items="${customers}">
                <tr>

                    <td><c:out value="${customer.lastName}"/></td>
                    <td><c:out value="${customer.address.city}"/></td>
                    <td><c:out value="${customer.address.state}"/></
td>
                    <td><c:out value="${customer.address.zip}"/></td>
                    <td><c:out value="${customer.phoneHome}"
default="no home phone specified"/></td>
               </c:forEach>
                  <tr>
                     <td>firstName and lastName:</td>
                     <td><c:out value="${name.firstName}"/></td>
                     <td><c:out value="${name.lastName}"/></td>
                   </tr>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Customer.java

public class Person
{
    public Name name;

    public Person() {}

    public Person(String firstName, String lastName)
    {
      name = new Name();

      name.setFirstName(firstName);

      name.setLastName(lastName);
    }
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Name.java

public class Name
{
    public String firstName;
    public String lastName;


    public void setFirstName(String firstName)
    {
        this.firstName = firstName;
    }

    public void setLastName (String lastName)
    {
        this.lastName = lastName;
    }

    public String getFirstName()
    {
        return firstName;
    }

    public String getLastName()
    {
        return lastName;
    }

}
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Init.java

Last statements of the private void init(ServletContextEvent sce)
method:


/**
         * Message arguments for parametric replacement
         */
        Object[] serverInfoArgs =
            new Object[] {
                sce.getServletContext().getServerInfo(),
                System.getProperty("java.version")
            };


        sce.getServletContext().setAttribute("serverInfoArgs",
serverInfoArgs);
        org.me.hello.Person person = new org.me.hello.Person
("Derez","Lusk");
        sce.getServletContext().setAttribute("person",person);
    }



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to