struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jamal Najmi <>
Subject Validator question
Date Sat, 08 Feb 2003 05:07:43 GMT

I am developing my Struts first application with Strus 1.3b.  I am using Validator Frameqork
that is a part of Struts Commons.  I intend to use Validator Framework with the ValidatorActionForm
instead of usual DynaActionForm.  What I have done is really try to follow the registration
example that is a part of the Struts example.  

My Action Farm is defined as:

public class AssUserForm  extends org.apache.struts.validator.ValidatorForm

My strut_config.xml is set up as:

<form-bean name="addUserForm" type="com.macrosoftinc.web.AddUser">

The action related to this form is:

<action path="/addUserSave" scope="request"

      type="com.macrosoftinc.web.AddUserAction" unknown="false"




   <forward name="success" path="/userList.jsp"/>

  <forward name="failure path="/addUser.jsp"/>



Validation XML has just one validation rule in it:

<form name="addUserForm">

    <field property="userId"

      depends="required,maxlength" key="${var:maxlength}" resource="false" />







I have following code in my addUser.jsp to display any error messages:

   <bean:message key="errors.header"/>
   <html:messages id="error">
      <li><bean:write name="error"/></li>

When I run the app, I get the following error:


root cause 


        at java.util.Hashtable.put(

        at org.apache.jasper.runtime.PageContextImpl.setAttribute(

        at org.apache.struts.taglib.html.MessagesTag.doStartTag(

        at org.apache.jsp.addUser_jsp._jspService(


Any ideas why I am getting this error?  I will really appreciate the help.  It looks like
I am not defining the error properly and the MessageTag is throwing excetpion.  

I will really appreciate any help I can get.



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message