• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:options

 
Ajai
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I am facing some problem in using html ptions .Below are the relevant snippets/

Jsp


<html:select name ="priceForm" property = "pricePurpose">
<html ptions collection = "pricePurposeList" property = "pricePurpose"/>
</html:select>



Action

while (rs.next()) {
System.out.println(rs.getString(1));
pricePurposeList.add(new PriceForm(rs.getString(1)));
}
request.setAttribute("pricePurposeList", pricePurposeList);



PriceForm is one bean


Struts_config.xml

<form-beans>
<form-bean name="priceForm" type="net.ubssngpb.starr.forms.PriceForm">
</form-bean>
</form-beans>
<action-mappings>
<action path="/getPricePurpose" type="com.ubs.starr.GetPricePurposeAction" name="priceForm" scope="request">
<forward name="home" path="Home.jsp">
</forward>
</action>
</action-mappings>


Error
SRVE0026E: [Servlet Error]-
[Cannot find bean under name priceForm]:
javax.servlet.jsp.JspException: Cannot find bean under name priceForm


Can anybody point out where am I going wrong?

Thanks
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you surrounding it with an html:form with an action of getPricePurpose?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic