The problems in error handling using Struts validation framework

前端 未结 2 1457
北恋
北恋 2020-12-21 10:41

I have following defined in

struts-config.xml:



    

        
2条回答
  •  北海茫月
    2020-12-21 11:36

    After you obtain the ActionMessages/ActionErrors object which contains the messages or errors you want to display in your input page (using tags or tags), you must call one of the following methods from your Action object to place the result of your validation in scope:

    addMessages(HttpServletRequest request, ActionMessages messages)
    

    or

    addErrors(HttpServletRequest request, ActionMessages errors)
    

    Are you doing that?

提交回复
热议问题