Hi,

I am using struts 1.2.9 for my project now. And for validating the user
input, I use DynaValidationForm and validation.xml to rule the user input.
At the client side (web page), I use the following code to show the error
information to the user.
           <logic:messagesPresent message="false">
               <tr>
                   <td>
                       <html:messages id="error">
                           <bean:write name="error"/>
                       </html:messages>
                   </td>
               </tr>
           </logic:messagesPresent>

But the error I got related to <bean:write> tag, the error log said:
javax.servlet.jsp.JspException: ServletException in
'/WEB-INF/view/layouts/centerlayout.jsp': ServletException in
'/WEB-INF/view/user/login/login.jsp': Cannot find bean: "error" in any scope

From the document, I see that html:messages will put the error variable into
the page scope. But why bean:write cannot find the error variable?

I also have a simple test that I change the <bean:write> to a constant
string, say "aaa". Then the output will be some aaa strings (depends on how
many errors detected). So I guess may be html:messages have not put the
error into the scope.

Please help me to have a look at it. Thanks.

Regards,
Yang

Reply via email to