Bookmark Topic Watch Topic
  • New Topic

EL/JSTL : Retrieving a Javabean from a List attribute

 
Graeme Byers
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Report post to moderator
EL/JSTL : Retrieving a Javabean from a List attribute

The session attribute BEmpModel.empBeanList is an ArrayList of JavaBean BEmpBean :
public int getEmpNo () { return empNo ; } and a toString()
Output from the <c:forEach> shows that it contains three items.
so what should I code to display EmpRow and EmpNo ?
I pretty sure that foundEmpno is unset because it's inside the loop.
How can I carry it's value outside the loop ?

Thank you for any help.

Output :

JSP
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65519
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
What is it that you think that this line:is going to do for you?

Hint: never ever ever will this test be true. Ever.
 
Graeme Byers
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi Bear,
Thank you for answering my query about date formatting - I must have been a bit tired.
As for this question , I'm attempting to do using servlets/JSP , stuff I routinely do using other technologies and I feel I may be off-track. So I have posted a question Using EL to retrieve bean values which in general terms outlines my problem.
Graeme.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!