Developing Controllers Using Servlets and JSPs
The controller performs the routing of requests to the view after extracting the requests, setting parameters on one or more command beans, and setting the result from the command beans as a request parameter accessible to the presentation layer.
There are two options for implementing the controllers to do the operations:
Using servlets
Using JSPs with scriptlets
Using Servlets for Implementing the Controller
Servlets, as the name implies, service requests. Servlets are Java classes that implement one of the interfaces defined in the javax.servlet.* or javax.servlet.http.* packages. These servlets are then deployed or loaded into a servlet container. The container invokes method callbacks on ...
Get Java Server Pages from scratch 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.