aspose file tools*
The moose likes Struts and the fly likes No getter method for property name of bean userList Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "No getter method for property name of bean userList" Watch "No getter method for property name of bean userList" New topic
Author

No getter method for property name of bean userList

Sanjay Deshpande
Ranch Hand

Joined: May 22, 2001
Posts: 111
I have a login form that leads to another action form.
This populates an Arraylist from database and puts in request
ArrayList userList = getUser();
request.setAttribute("userList",userList);
When i try to access values from action-class , all values from database are printed as well.
I have following code in jsp:
<logic:iterate id="userList" name="userList" scope="request" >
<bean:write name="userList" property="name" />
</logic:iterate>
I get folowing error :
No getter method for property name of bean userList
Any clue?
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4991
    
    8

You choice of names is not exactly ideal. getUser() should return a list whose elements are objects that have a getName() method. To improve readability, I suggest that you write something like:

This results in logic that in effect does this:

The italicized code won't work as is but is what effectively happens.
[ August 27, 2003: Message edited by: Junilu Lacar ]

Junilu - [How to Ask Questions] [How to Answer Questions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No getter method for property name of bean userList