> -----Original Message-----
> From: uma.k [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, December 29, 2004 8:02 AM
> To: 'Struts Users Mailing List'
> Subject: Cannot find bean under name dbCategories
>
>
> Hi,
> I get this exception when I try to use html:options with
> collection="dbCategories".
>
> This is what I am doing
First, remove anything from your hands coz you're going to have a doh moment. :)
Second, follow along the number :)
> index.jsp
> <html:link page="/articleForm.do">Article</html:link>
1)So the user clicks the link, Sending them to the articleForm action,
>
> my struts-config.xml
> <action path="/articleForm" forward="/articles/Template.jsp" />
2) This sends them to the Template.jsp page
>
> <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
3) Which can't find the dbCategories because /PreviewArtilce is only called
AFTER you submit the form, not before.
> <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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]