wood burning stoves 2.0*
The moose likes JSP and the fly likes access custom bean in EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "access custom bean in EL" Watch "access custom bean in EL" New topic
Author

access custom bean in EL

igor kvak
Greenhorn

Joined: May 28, 2008
Posts: 17
hi
i want to acces custom bean in jsp using expression language:


where empList is LinkedList<Employee> (stored this way: session.setAttribute("empList", list);)

i always get this error:
javax.el.PropertyNotFoundException: The class 'java.lang.String' does not have the property 'getName'. (but according to the way how I store list, I dont know why is it stored as String)

thanks for help


Never trouble trouble till trouble troubles you
Rajkumar balakrishnan
Ranch Hand

Joined: May 29, 2008
Posts: 445

Originally posted by igor kvak:
hi
i want to acces custom bean in jsp using expression language:


where empList is LinkedList<Employee> (stored this way: session.setAttribute("empList", list)

i always get this error:
javax.el.PropertyNotFoundException: The class 'java.lang.String' does not have the property 'getName'. (but according to the way how I store list, I dont know why is it stored as String)

thanks for help

What the var emp means...?
Please post your servlet file and bean file...


Never try to be a hard-worker. Be a smart-worker.
My Blog
igor kvak
Greenhorn

Joined: May 28, 2008
Posts: 17
thanks, i finally solved it
mistake was in this line:

and the correct one is:
 
 
subject: access custom bean in EL
 
Similar Threads
Iteration of List in JSP
Display ArrayList data on jsp page
EL with List of Objects
List of checkboxes and Array/ArrayList data binding not working.
JSP not picking up getAttribute from Servlet