Addition ...Extends to ActionForm ..

Regards
Rohit Aeron



-----Original Message-----
From: Fumitada Hattori [mailto:[EMAIL PROTECTED] 
Sent: Sunday, September 07, 2003 3:16 PM
To: Struts Users Mailing List
Subject: Why is "No getter method for property" happening... damn.

Hi gurus,

I got a simple bean below.
------------
public class Company {
   private static ArrayList list;
   private int id;
   private String name;

   static{
      list = new ArrayList();
      list.add(new Company(0,""));
      list.add(new Company(1,"MS"));
      list.add(new Company(2,"SUN"));
      list.add(new Company(3,"IBM"));
      list.add(new Company(4,"SYBASE"));
   }

   public Company(){}

   public Company(int id, String name){
      this.id = id;
      this.name = name;
   }

   public int getId(){
      return id;
   }

   public String getName(){
      return name;
   }

   public static ArrayList getList(){
      return list;
   }
}
-----------

This bean is set into the application scope at tomcat starts.
sc.getServletContext().setAttribute("company",new Company());

In jsp, I try to get the bean like this.
<logic:iterate id="id" name="company" property="list" scope="application">
   <bean:write name="id" property="name"/><BR>
</logic:iterate>

It's supposed to be showen like
MS
SUN
IBM
SYBASE

but I get the following error.
org.apache.jasper.JasperException: No getter method for property list of bean
company

why ?? I cannot figure out...damn.

Thanks in advance.




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



*----------
This message and any attachment(s) is intended only for the use of the addressee(s) 
and may contain information that is PRIVILEGED and CONFIDENTIAL. If you are not the 
intended addressee(s), you are hereby notified that any use, distribution, disclosure 
or copying of this communication is strictly prohibited. If you have received this 
communication in error, please erase all copies of the message and its attachment(s) 
and notify the sender or Kanbay postmaster immediately.

Any views expressed in this message are those of the individual sender and not of 
Kanbay.

Although we have taken steps to ensure that this e-mail and any attachment(s) are free 
from any virus, we advise that in keeping with good computing practice the recipient 
should ensure they are actually virus free.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to