struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "uma.k" <um...@net-kraft.com>
Subject Cannot find bean under name dbCategories
Date Mon, 27 Dec 2004 15:51:56 GMT
Hi,
I get this exception when I try to use html:options with
collection="dbCategories".

This is what I am doing
index.jsp
<html:link page="/articleForm.do">Article</html:link>

my struts-config.xml
<action path="/articleForm" forward="/articles/Template.jsp" />

<action
    	path="/PreviewArticle"
    	type="articles.ArticlePreviewAction"
    	name="articleForm"
    	scope="request"
    	validate="false"
    	input="/articles/Template.jsp">
	<forward name="success" path="/articles/Preview.jsp"/>
	<forward name="failure" path="/articles/Template.jsp"/>
</action>

Template.jsp
<html:form action="/PreviewArticle.do" focus="keywords"
enctype="multipart/form-data">
<html:select name="articleForm" property="category">
<html:options collection="dbCategories" property="id"
labelProperty="description"/>
</html:select>
...
...
</html:form>

My ArticlePreviewAction.java
dbCategories = dbBean.getCategoriesForArticle(myConnection);
request.setAttribute("dbCategories", dbCategories);

Please let me know where I have gone wrong. As I am unable to figure out the
problem.

Thanks
Uma


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message