1) You have some kind of getter and setter for txt property not for txt1, txt2, 
....txt3 property
You'd better look for indexed properties

-----Messaggio originale-----
Da: Aftab Vhora [mailto:[EMAIL PROTECTED] 
Inviato: lunedì 18 settembre 2006 12.06
A: Struts Users Mailing List
Oggetto: Dynamically Generated html:Text

Hi,

I m dynamically generating the html:text , i have made correct entry in 
the struts config.xml and also implemented the Action Form and Action 
class.

But I m getting below error, request you to kindly provide me the solution.

===========ERROR============

javax.servlet.jsp.JspException: No getter method for property txt1 of 
bean org.apache.struts.taglib.html.BEAN
at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:968)
at 
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:176)
at _test._jspService(_test.java:63)
[/test.jsp]
.................

=====action form=========
public class myMapForm extends ActionForm
{
  private final Map values = new HashMap();

      public void setTxt(String key, Object value) {
          values.put(key, value);
      }

      public String getTxt(String key) {
          return (String)values.get(key);
      }

}

========JSP file(test.jsp)=============

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; 
charset=windows-1252"/>
    <title>Google Client</title>
  </head>
  <body>
  <html:form action="process">
     <%
     for(i=0;i<1;i++)
     %>
     <html:text property='<%="txt" + i %>' />
  </html:form>
    </body>
</html>


-- 
Thanks & Regards,
Aftab Vhora
Oracle India Pvt Ltd,
Cell-9880 311 391


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

Reply via email to