0

I'm having a problem like this.

  1. I'm in page-1 with URL-1
  2. When I click submit in page-1, validation is going on the controller via URL-2 before showing page-2. But there are errors and the validation failed.
  3. So I should still see page-1. But the URL is URL-2 whose naming doesn't match with page-1.

How can I solve this? I find it hard to redirect the errors back to page-1.

David Ruan
  • 534
  • 4
  • 18
  • Why do you collect output of page-1 on URL-2 and not on URL-1? You could collect it on URL-1 and, if everything is ok, redirect to URL-2 after the form post is processed. – Roman Puchkovskiy Jul 06 '17 at 19:17
  • this one explains how to do post-redirect-get validation with spring: https://stackoverflow.com/questions/29039116/spring-mvc-validation-post-redirect-get-partial-updates-optimistic-concurren – Neil McGuigan Jul 06 '17 at 19:17

0 Answers0