How can I display an error message in the very same JSP when a user submits a wrong input? I do not intend to throw an exception and show an error page.
I see tag "form-validation", so maybe you should just use JavaScript and client form validation? If you need validation with JSP, handle form data, and redisplay the form with an error message or accept form data, if it's correct.