Greetings,

I am having a problem where a blank screen is presented instead of redirecting the 
user back to the "input" attribute if the validate() method returns errors.  If 
validate() finds no errors or if i set validate="false" for the action, processing is 
ok with successful redirection to the success page defined in my mapping.  The 
configuration for the action is shown below.

I have set up the "TestForm" to always add an error during my testing and the println 
shows that errors.size() is 1 on the console.  I am using tomcat 4.1.12 and there are 
no error messages appearing in the log files.

"error.dummy.testing" is defined in my properties file and errors are successfully 
displayed on another page in my app when the ActionErrors are set and saveErrors(...) 
is called in my Action subclass.

I'd appreciate any ideas as to what is going wrong with my configuration before i 
start nosing through the struts source code.

Thanks,

-Mark

TestForm snippet

    public ActionErrors validate(ActionMapping mapping,
                                 HttpServletRequest request) {

        ActionErrors errors = new ActionErrors();
        errors.add(ActionErrors.GLOBAL_ERROR, new ActionError("error.dummy.testing"));
        System.out.println("actionerrors size, " + errors.size());
        
        return errors;

    }

-----------------------------------------------------------------------------
struts-config.xml snippet

        <form-bean              name="testForm"
                                        type="strutstest.TestForm"/>

    <action
       path="/addProfileEntry"
       forward="/WEB-INF/jsp/addProfile.jsp">
    </action>

    <action     path="/addProfile"
            type="strutstest.TestAction"
            name="testForm"
            scope="request"
            input="/WEB-INF/jsp/addProfile.jsp"
            validate="true">
      <forward name="success"    path="/WEB-INF/jsp/addProfileConfirmation.jsp"/>
    </action>

--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@;jakarta.apache.org>

Reply via email to