Hi,
The way you are saying is working but in the home work if you check the below is written: . The response.jsp displays following information - the display format can be in any form - using the Expression Language notation as following o ${person.name.firstname} o ${person.name.lastname} Name should be a field of Person class and the in response.jsp you should access name attributes using Person. Is my understanding correct? Regards, Vinod From: java-ee-j2ee-programming-with-passion@googlegroups.com [mailto:java-ee-j2ee-programming-with-pass...@googlegroups.com] On Behalf Of Warren Schembri Sent: Monday, March 09, 2009 4:29 AM To: java-ee-j2ee-programming-with-passion@googlegroups.com Subject: [java ee programming] Re: Homework Lab 4006 - Not sure what I'm doing wrong Thanks to all the responses. I have it working now On Sun, Mar 8, 2009 at 2:38 PM, Biljana Biljana <biljana_b...@yahoo.com> wrote: You have to have create funciton in class funcio, you call this funcion in Init. java, where you crete Vector person to this one you add you example firstName, and lastName, vector person you add like Attributeto servlet Context, with one funcion findAll ,which you have to implemented in Person class, then you you in response write this: <c:forEach var="name" items="${person}"> <tr> <td><c:out value="${.name.firstName}"/></td> <td><c:out value="${name.lastName}"/></td> </tr> </c:forEach> everythig is done with custemer, end customers, only you have to do is do that similar for Name and Person! --- On Sat, 3/7/09, Warren Schembri <wschem...@gmail.com> wrote: From: Warren Schembri <wschem...@gmail.com> Subject: [java ee programming] Homework Lab 4006 - Not sure what I'm doing wrong To: java-ee-j2ee-programming-with-passion@googlegroups.com Date: Saturday, March 7, 2009, 2:14 PM Hi All, I have created the Person/Name object. However, it is not working In Init.java, I have the following code: Person person = new Person ("Warren", "Schembri"); sce.getServletContext().setAttribute("my_person", person); In response.jsp, I have the following: <table border="1"> <c:forEach var="person" items="${my_person}"> <tr> <td><c:out value="${person.name.firstName}"/></td> <td><c:out value="${person.name.lastName}"/></td> </tr> </c:forEach> </table> I am using GlassFish by the way. Just cannot work out why this is not working. Thanks in advance Warren --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---