File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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:
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: access custom bean in EL
 
Similar Threads
Display ArrayList data on jsp page
EL with List of Objects
JSP not picking up getAttribute from Servlet
Iteration of List in JSP
List of checkboxes and Array/ArrayList data binding not working.