You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by kiuma <ki...@usa.net> on 2002/09/17 13:00:28 UTC

[STRUTS] Form error handling

Hello,
mine is a newbie question:

When validate fails i put some code like this:

newError = new ActionError("myform.error", "")
errors.add( ActionErrors.GLOBAL_ERROR, newError );

in my properties file I put the key relative to myform.error.

in struts-config.xml

        <action name="listedUserForm" input="/secure/userlist.jsp" 
path="/listedUser" type="com.wingstech.webappointments.ListedUserAction" 
                parameter="action" validate="true">
            <forward name="Success" path="/secure/userlist.jsp" 
redirect="true" />
        </action>      

When validate() returns error, struts should dirve me to input page.

How can I parse errors in my jsp page, then?

thanks,
kiuma



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>