• Post Reply Bookmark Topic Watch Topic
  • New Topic

JSTL <c:forEach .../> tag not working with collection

 
vijay dadhwal
Ranch Hand
Posts: 47
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am able to use Struts <login:iterate ..> tag correctly. But if i want to replace it with JSTL <c:forEach .../> tag then it does not work.

Below is the code snipplet.

I have a set ArrayList employee in a request attribute. The employee arraylist contains the collection of the object employee.
as follows :-


The above code works fine without any problem.

But as mentioned below


This does not work. I just prints a single line like this

User name Name Phone Email Department Role
${employee.username} ${employee.name} ${employee.phone} ${employee.email} ${employee.department} ${employee.rolename}


What could be the cause ?

Regards
Vijay
 
Han Jie
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it looks like that there is no problem in you codes.
this entry ElOrJstlNotWorkingAsExpected may help you out, reference to it and find what is the key cause.
 
vijay dadhwal
Ranch Hand
Posts: 47
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks

it was exactly the problem, i was reffering the wrong tld file.

it's working now

Regards
Vijay
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!