Cannot find bean error in any scope


Web tier: servlets, JSP, Web frameworks: Cannot find bean error in any scope

  1. Cannot find bean error in any scope (1 messages)

    I am using the Validator framework for a Struts 1.2.7 app. I have a login page for which I am validating for required fields (username & password). When I hit the submit button, I get an error message saying "Cannot find bean error in any scope". Doesn't this error bean get created by the validator framework? What is the problem?

    Here is my Login.jsp -
    <%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
    <%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
    <%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>

    <link href="<html:rewrite page="/css/argenerator.css" />" rel="stylesheet" type="text/css">
    <title>AR# Generator - Login</title>
    <body topmargin="0">
    <!--<table width="790" cellspacing="0" cellpadding="0">
    <tr height="8"><td width="100%" bgcolor="#e6e6c7" valign="middle">&nbsp;</td></tr>-->
    <html:img page="/img/banner.jpg" />

    <table width="790" cellspacing="0" cellpadding="0">
    <tr><td align="center">

    <tr><td align="center">
    <span id="errorsHeader"><bean:message key="errors.validation.header"/></span><br>
    <html:messages id="error">
    <bean:write name="error"/><br>


    <html:form action="" focus="username">
    <tr><td align="center">
    Username: <html:text property="username" size="15" maxlength="20" styleClass="cool"/>
    <tr><td align="center">
    Password : <html:password property="password" size="15" maxlength="20" styleClass="cool"/>
    <tr><td align="center" height="50">
    <html:submit><bean:message key="button.login" /></html:submit>

    <%@include file="Contact.jsp"%>

  2. Cannot find bean error in any scope[ Go to top ]

    I figured out what the problem is. I had provided the incorrect message property name in the validation-rules.

    My validation-rules.xml had -
    <validator name="required"

    But I had "error.required" in my message properties file.