The error message is not related to the <logic:messagesPresent> tag.
This error is caused by having an html:xxx form field tag (checkbox,
file, text, textarea, password, etc.) that is not inside an
<html:form></html:form> tag. Look at the erroring jsp's to see where
this is the case.

Often exception traces (if the JSP is compiled with debugging support)
will contain the line in the JSP that caused the exception which can
help a lot in localizing the problem.

-ed

On 11/13/06, Puneet Lakhina <[EMAIL PROTECTED]> wrote:
I am using html messages tag to do custom formatting of my error messages on
different pages.
I have something like this
<logic:messagesPresent>
<html:messages id="error">
            <bean:write name="error" filter="false" />
</html:messages>
</logic:messagesPresent>
This usually works fine but under certain conditions I get
Cannot find bean error in any scope
javax.servlet.jsp.JspException: Cannot find bean error in any scope
    at org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:938)
    at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:286)
...

I don't understand this.  If there are no messages then it shouldn't even
come to bean write isn't it?
I am using struts 1.1 and any errors are added in the validate method of the
form bean.

Thanks
--
Puneet



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to