6.2. The collaboration between form, servlet, and JSP
As mentioned above, a servlet processes user input, invokes enterprise business logic and places the results in a single bean. That bean gets passed to a JSP as an attribute of the request object and the JSP inserts the appropriate properties into the appropriate places in the output HTML.
It’s quite likely that the HTML being produced contains a form with the expectation that the same sort of servlet and JSP processing will occur again as a result of the form posting its data. Another possible execution path involves the detection of an error in the user-supplied data from the form. In this scenario the servlet will re-invoke the original JSP and will pass to that JSP the data from the posted ...
Get WebSphere V3.5 Handbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.