...

View Full Version : Struts:select tag issue



syedali77
05-05-2004, 12:42 PM
I have a JSP that has the following code:

<html:select name="formBean" property="textId">
<html:options
collection="WORDS"
property="txtBody"
labelProperty="txtName"
</html:options>
</html:select>

I have the setters and getters for the bean attributes in the form bean that is defined in the struts-config.xml file as:
<form-beans>
<form-bean name="formBean" type="com.xora.apps.messaging.presentation.form.MyForm
</form-beans>

The collection WORDS is set in the request attribute and contains a List of values when the action form is called(ie when the form loads) to be populated in the options tag. But when the form loads the message:

500 Servlet Exception
javax.servlet.jsp.JspException: Cannot find bean under name formBean

is displayed even after manually creating the formBean instance in the ActionForm page as
MyForm formBean = new MyForm();

Any fix suggested would be greatly appreciated...

-Ali

Garadon
05-05-2004, 01:27 PM
I would suggest u try a java forum.

Kor
05-05-2004, 01:51 PM
JSP and JavaScript are different things. Try Java or server-side languages Forum



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum