Whats the difference between ServletContext and PageContext?
The ServletContext and PageContext classes are quite different and do not belong to the same class hierarchy. The ServletContext holds references to the overall context of the Web application, such as the servlets that belong to the application, server information, logging facilities and global configuration settings. The PageContext is a collection of request and response references for a single JSP servlet instance, for handling errors, forwarding requests and suchlike. The PageContext also has references to the JSP ServletConfig and master ServletContext objects, but is designed only as a temporary interface to those object references for the duration of a single service request. Actions: Follow-up, clarify or correct this answer. Submit a new question.