wrote:
> I assume I can create an object using JavaBean class where I
> will take all the fields (via getter and setter methods) and use a
> special method to grab all the fields into one object. Then call that
> special method in my Servlet?
That's one way, although you don't really need any method more special than
doPost(), unless things get large enough to refactor.
You could also, for example, use the ServletRequest method getParameterMap()
and work directly off the Map of parameters:
<http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletRequest.html#getParameterMap()>
This has the advantage of grabbing all the parameters in one fell swoop, and
the disadvantage of leaving all the parameter values as unvalidated Strings
packaged in the String [] values of the Map.
--
Lew