aspose file tools*
The moose likes Struts and the fly likes JspException: No getter method Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JspException: No getter method" Watch "JspException: No getter method" New topic
Author

JspException: No getter method

Sam Shen
Greenhorn

Joined: Feb 15, 2002
Posts: 8
Hi,
I've a problem in using struts bean tag.
When I ran the following jsp file:
jsp file:..........
<logic:iterate id="element" name="items">
<li><bean:write name="element" property="name" /> <<---- this line causes problem
</logic:iterate>
result:...........
javax.servlet.jsp.JspException: No getter method for property name of bean element
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:742)
at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:290)

"items" is a hashtable in session.
When I use the following code:
<%
Hashtable hitems= (Hashtable)session.getAttribute("items");
for (Enumeration e = hitems.elements(); e.hasMoreElements(); ){
WatchItem witem = (WatchItem)e.nextElement();
%>
<%=witem.getName() %>
<%
}
%>
I can get each property from items's element.
Can you give me some help?
Many Thanks,
Sam
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61413
    
  67

Moving to the Struts forum.
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: JspException: No getter method