posted 16 years ago
Hi,
While reading the post I had some questions so just thought of posting it.
1) If POJO wants to get some values from ServletContext , I assume that POJO is loaded as part of some servlet call in webapp class loader. This would mean POJO executing inside Servlet Container itself. In this case why would you say ServletContext outside the Servlet Container.
2) As per Bear's reply passing the values and not the ServletContext to the POJO would be a good design with regards to coupling between the POJO and Servlet APIs. This would enable re-use of POJO in some other framework.
Please correct me if I am wrong, especially in #1.
Regds,
Amit