Spring MVC: Jak przekierować na stronę z błędem?

Staram się, aby mój kontroler przekierował do strony z niestandardowym komunikatem o błędzie:

    @RequestMapping(method=RequestMethod.POST)
    public String processSubmit(@Valid Voter voter, BindingResult result, HttpServletRequest request) {
        if (result.hasErrors()) {
            logger.info("RegisterController encountered form errors ");
            return "registerPage";
        }
        if (service.isVoterRegistered(voter.getVoterID())) {
          logger.info("VoterID exists");

          request.setAttribute("firstName", voter.getFirstName());
          request.setAttribute("lastName", voter.getLastName());
          request.setAttribute("ssn", voter.getSsn());
          return "forward:/question";

        }else {
          logger.info("RegisterController is redirecting because it voter info failed to authenticate");
          //TODO: should re-direct to register page with error

          return "redirect:registerPage";
        }
       }
}


  <!-- registerPage.jsp -->
    <div class="container">
        <h1>
            Voter Registration
        </h1>
        <div class="span-12 last">  
            <form:form modelAttribute="voter" method="post">
                <fieldset>      
                    <legend>Voter Fields</legend>
                    <p>
                        <form:label for="firstName" path="firstName" cssErrorClass="error">First Name : </form:label></br>
                        <form:input path="firstName" /><form:errors path="firstName"/>
                    </p>
                    <p> 
                        <form:label for="lastName" path="lastName" cssErrorClass="error">Last Name : </form:label> </br>
                        <form:input path="lastName" /> <form:errors path="lastName" />
                    </p>
                    <p> 
                        <form:label for="ssn" path="ssn" cssErrorClass="error">Social Security Number : </form:label> </br>
                        <form:input path="ssn" /> <form:errors path="ssn" />
                    </p>
                    <p> 
                        <input type="submit"/>
                    </p>
                </fieldset>
            </form:form>
        </div>
        <hr>    
    </div>

Po przekierowaniu na stronę register.jsp chcę, aby strona wyświetlała komunikat o błędzie, mówiąc, że wyborca ​​nie jest zarejestrowany. Moje pytanie brzmi: jak uzyskać kontroler, aby powrócił na stronę tak, jakby formularz miał błąd sprawdzania poprawności (tj. Result.hasErrors () == true).

Z góry dziękuję

questionAnswers(2)

yourAnswerToTheQuestion