Scriptless JSP Pages: The Power of the Map in the August, 2005 issue of the JavaRanch Journal. Check out the article, then come back and jaw a spell about it right here!
However, I will assert that the utility of creating a "form abstraction" as described here is more far-reaching than this example. Imagine that such a class was extended to be able to fetch its known parameters given a request instance, could convert the parameter values from strings to integers, dates or other non-string types as appropriate, and perhaps even perform simple, context-free validations on its elements. This would be a powerful abstraction that not only collects the form elements into a cohesive entity, but decouples the concepts of the "form" from the servlets (or other items) that reference it.
The utility of such an abstraction might not seem evident when thinking of our simple login form that possesses two simple string fields. But imagine a more complex form; say, the myriad fields of various types that go into selling an item on eBay�. Collecting all this information into an abstracted instance could significantly simplify the code that needs to deal with it.
Can I assume this is the subject for your next article?? Hmmm?
These are not the droids you are looking for. Perhaps I can interest you in a tiny ad?
ScroogeXHTML 7.2 - RTF to HTML5 / XHTML converterhttps://coderanch.com/t/692027/ScroogeXHTML-RTF-HTML-XHTML-converter