* Can any one check what is wrong in my code

*I can see the page with "Hello" message and very small table BUT  NOT
printing First Name and Last Name:
----------------------------------------------------------------------------------------------------------------------------------------
*Response.java

<jsp:useBean id="mybean" scope="session"
class="org.me.hello.NameHandler" />
        <jsp:setProperty name="mybean" property="*"  />
        Hello, <jsp:getProperty name="mybean" property="name" />
        <br>
        <br>

        <%-- Exercise Expression Language  --%>
        <table border="1">

                <tr>
                    <td><c:out value="${person.name.firstName}"/></td>
                    <td><c:out value="${person.name.lastName}"/></td>
               </tr>
        </table>

------------------------------------------------------------------------------------------------------------------------------------------
*InIt.java


private void init(ServletContextEvent sce) {

            Person p1 = new Person("Ketul", "Patel");

            sce.getServletContext().setAttribute("per", p1);
    }

-----------------------------------------------------------------------------------------------------------------------------------------------
*Person.java


public class Person {

   private Name name;

    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;
    }


}

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to