Good Day,
The book "Sun Certified Enterprise Architect for
J2EE, Study Guide" by Paul Allen and Joseph Bambara says the following on page #268:
Applicable Scenarios (for the Strategy pattern)
- Multiple classes differ only in their behaviors. The servlet API is a classic example of this.
I think the
pattern is used in the init() and service() methods.
init() gets as a parameter an instance that implements the ServletConfig interface and service() gets instances which implement the ServletRequest and ServletResponse interfaces.
Any thoughts?
Thanks,
Dan