I'd like to implement the following structure:
Servlet (GET) (put collection of X on request) | JSP (output list of X) <-- | | Servlet (POST) ----------- Validation error! | Validated OK, continue
I've implemented this using the pattern described in How to avoid Java code in JSP files? but I want to know if there's a simple way of avoiding having to reload my collection of X during the validation stage since it's no longer on the request object. I am putting some validation messages on the request scope in the POST stage so I need to be able to access these.
I'm trying to avoid a framework at this stage since the scale of the project doesn't seem to justify it.