OK, now I see what's happening. The <html:form> tag sets the form bean as a
page attribute, so when your nested page (the one brought in using the
template tags) is processed, the form bean is not available, since it is in
a different page context. Hence the <html:text> tag, which needs access to
the form bean, fails.

One way to fix this would be to have the <html:form> tag store the bean as a
request attribute instead of a page attribute. However, I'm not sure if that
would break something else. I don't think so, but I'm not certain. That's a
question for Craig, I think.

--
Martin Cooper
Tumbleweed Communications

----- Original Message -----
From: "Incze Lajos" <[EMAIL PROTECTED]>
To: "Martin Cooper" <[EMAIL PROTECTED]>
Sent: Wednesday, February 28, 2001 2:25 PM
Subject: Re: PROPOSAL: Template Screens


> On Wed, Feb 28, 2001 at 01:54:16PM -0800, Martin Cooper wrote:
> > What exception are you getting? Also, which build of Struts are you
using?
> >
> > I don't see any code that checks for being contained in a form (but that
may
> > be part of the problem!), except in the <template:put> tag, so some more
> > information on what's happening would definitely help.
> >
> > Thanks,
> >
> > Martin.
> >
>
> I did not check the code but in a formar letter i've read this
> diagnosis (I cite it all):
>
> -------------------------------------------------------------------------
> Date: Wed, 31 Jan 2001 16:04:41 -0800
> From: "Craig R. McClanahan" <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: Re: Help Please: Resource not found
>
> [EMAIL PROTECTED] wrote:
>
> > When trying to call a JSP I receive the following message from Tomcat:
> >
> > javax.servlet.ServletException: Cannot find bean under name
> > org.apache.struts.taglib.html.BEAN
> >            at
>
>org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextIm
pl.java:459)
> >
> > I checked the STRUTS distribution and did not find it.  Has anyone
> > encountered this before?  Thanks.
>
> You would get this error if you tried to use one of the input field tags
like
> +<html:text>
> -------------------------------------------------------------------------
>
> I experianced the same exception and I felt so, that probably the
> jsp got by the template does not feel itself inside an html:form.
> There was no code check as I found very quicly the above reference.
>                                                            incze


Reply via email to