I'm new to Servlets. 1. What motivations are there to make utility classes Servlets themselves? Life-cycle might be one, HttpServlet interface might be another. But, in the latter case, why not just inherit the interface?
For example, forwarding a request. Why not instead just pass the HttpRequest object to the utility object and have that object return to the calling servlet?
2. Utility classes, including servlets, are allowed to make calls outside the container, can they not? Say as a socket client?
Your perspectives are appreciated!
For example, forwarding a request. Why not instead just pass the HttpRequest object to the utility object and have that object return to the calling servlet?
2. Utility classes, including servlets, are allowed to make calls outside the container, can they not? Say as a socket client?
Your perspectives are appreciated!