File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "JspException: No getter method" Watch "JspException: No getter method" New topic

JspException: No getter method

Sam Shen

Joined: Feb 15, 2002
Posts: 8
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
javax.servlet.jsp.JspException: No getter method for property name of bean element
at org.apache.struts.util.RequestUtils.lookup(
at org.apache.struts.taglib.bean.WriteTag.doStartTag(

"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,
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63862

Moving to the Struts forum.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: JspException: No getter method
It's not a secret anymore!