This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
You have all the information on the server -- including the nature of the error that your code just detected. It's an easy matter to use JSP technology to format the HTML as appropriate. You can conditionally create an error message on the page, and fill in the form fields with the previous submitted value for a parameter.
For example, assuming that the JSP is being generated in the same request as the form submission (not always true):
Conditional markup is easy with the JSTL <c:if> action:
[ June 17, 2007: Message edited by: Bear Bibeault ]