You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Kurt Chen <ku...@mail.bct.com.tw> on 2001/09/06 05:30:48 UTC
Need Helps with Form-Tag
What's up, dude!!
I'm trying to use a form tag in my JSP, but it doesn't work out . my source code as the following........does anyone has any idea about what's going on right here. your help will be greatly appreciated.......
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html>
<html:form action="/on_data.do">
<html:select property="pmFabNumber">
<html:options collection="attr2" property="attr_name" />
</html:select>
</html:form>
</html:html>
Error meassge as follow
<Error> <HTTP> <[WebAppServletContext(3365205,sample_struts,/sample_struts)] Root cause of ServletException
javax.servlet.jsp.JspException: No getter method available for property name for
bean under name attr2 at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:238
Thank You
Kurt
Re: Need Helps with Form-Tag
Posted by "Jishan Li(CN)" <li...@yahoo.com.cn>.
The problem lies in the beans in your ArrayList. Could you paste the code of the bean here? there should be a method named
public String getAttr_name()
In the bean class.
----- Original Message -----
From: Kurt Chen
To: struts-user@jakarta.apache.org
Sent: Thursday, September 06, 2001 1:26 PM
Subject: Re: Need Helps with Form-Tag
Oops........
i missed some of my code.......the code should be in following.Please take a look at the code again and kindly tell me what's wrong with my code. thanks
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%
java.util.ArrayList attr2(java.util.ArrayList)request.getAttribute("attr2");
pageContext.setAttribute("attr2", attr2s);
%>
<html:html>
<html:form action="/on_data.do">
<html:select property="pmFabNumber">
<html:options collection="attr2" property="attr_name" />
</html:select>
</html:form>
</html:html>
Error meassge as follow
<Error> <HTTP> <[WebAppServletContext(3365205,sample_struts,/sample_struts)] Root cause of ServletException
javax.servlet.jsp.JspException: No getter method available for property name for
bean under name attr2 at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:238
Thank You
Kurt
----- Original Message -----
From: Jishan Li(CN)
To: struts-user@jakarta.apache.org
Sent: Thursday, September 06, 2001 12:44 PM
Subject: Re: Need Helps with Form-Tag
Kurt Chen:
It depends on the beans in you collectin attr2.
It seems that there is no a getter for attr_name like getAttr_name() in your beans.
wish this help!
Jishan Li.
----- Original Message -----
From: Kurt Chen
To: struts-user@jakarta.apache.org
Sent: Thursday, September 06, 2001 11:30 AM
Subject: Need Helps with Form-Tag
What's up, dude!!
I'm trying to use a form tag in my JSP, but it doesn't work out . my source code as the following........does anyone has any idea about what's going on right here. your help will be greatly appreciated.......
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html>
<html:form action="/on_data.do">
<html:select property="pmFabNumber">
<html:options collection="attr2" property="attr_name" />
</html:select>
</html:form>
</html:html>
Error meassge as follow
<Error> <HTTP> <[WebAppServletContext(3365205,sample_struts,/sample_struts)] Root cause of ServletException
javax.servlet.jsp.JspException: No getter method available for property name for
bean under name attr2 at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:238
Thank You
Kurt
Re: Need Helps with Form-Tag
Posted by Kurt Chen <ku...@mail.bct.com.tw>.
Oops........
i missed some of my code.......the code should be in following.Please take a look at the code again and kindly tell me what's wrong with my code. thanks
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%
java.util.ArrayList attr2(java.util.ArrayList)request.getAttribute("attr2");
pageContext.setAttribute("attr2", attr2s);
%>
<html:html>
<html:form action="/on_data.do">
<html:select property="pmFabNumber">
<html:options collection="attr2" property="attr_name" />
</html:select>
</html:form>
</html:html>
Error meassge as follow
<Error> <HTTP> <[WebAppServletContext(3365205,sample_struts,/sample_struts)] Root cause of ServletException
javax.servlet.jsp.JspException: No getter method available for property name for
bean under name attr2 at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:238
Thank You
Kurt
----- Original Message -----
From: Jishan Li(CN)
To: struts-user@jakarta.apache.org
Sent: Thursday, September 06, 2001 12:44 PM
Subject: Re: Need Helps with Form-Tag
Kurt Chen:
It depends on the beans in you collectin attr2.
It seems that there is no a getter for attr_name like getAttr_name() in your beans.
wish this help!
Jishan Li.
----- Original Message -----
From: Kurt Chen
To: struts-user@jakarta.apache.org
Sent: Thursday, September 06, 2001 11:30 AM
Subject: Need Helps with Form-Tag
What's up, dude!!
I'm trying to use a form tag in my JSP, but it doesn't work out . my source code as the following........does anyone has any idea about what's going on right here. your help will be greatly appreciated.......
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html>
<html:form action="/on_data.do">
<html:select property="pmFabNumber">
<html:options collection="attr2" property="attr_name" />
</html:select>
</html:form>
</html:html>
Error meassge as follow
<Error> <HTTP> <[WebAppServletContext(3365205,sample_struts,/sample_struts)] Root cause of ServletException
javax.servlet.jsp.JspException: No getter method available for property name for
bean under name attr2 at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:238
Thank You
Kurt
Re: Need Helps with Form-Tag
Posted by "Jishan Li(CN)" <li...@yahoo.com.cn>.
Kurt Chen:
It depends on the beans in you collectin attr2.
It seems that there is no a getter for attr_name like getAttr_name() in your beans.
wish this help!
Jishan Li.
----- Original Message -----
From: Kurt Chen
To: struts-user@jakarta.apache.org
Sent: Thursday, September 06, 2001 11:30 AM
Subject: Need Helps with Form-Tag
What's up, dude!!
I'm trying to use a form tag in my JSP, but it doesn't work out . my source code as the following........does anyone has any idea about what's going on right here. your help will be greatly appreciated.......
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<html:html>
<html:form action="/on_data.do">
<html:select property="pmFabNumber">
<html:options collection="attr2" property="attr_name" />
</html:select>
</html:form>
</html:html>
Error meassge as follow
<Error> <HTTP> <[WebAppServletContext(3365205,sample_struts,/sample_struts)] Root cause of ServletException
javax.servlet.jsp.JspException: No getter method available for property name for
bean under name attr2 at org.apache.struts.taglib.html.OptionsTag.doEndTag(OptionsTag.java:238
Thank You
Kurt