What is the difference between ServletContext and PageContext?

Simon Brown

The ServletContext gives information about the container in which the servlet (or JSP) is running in. Parameters for this can be setup in the web application deployment descriptor and there is one ServletContext per web application.

The PageContext gives the servlet (or JSP) information about the request that it is currently handling and contains information about the request and any parameters, the session, the response object, a reference to the output stream and also a reference to the web application's ServletContext.

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact