What is ServletContext object?
Answered
What is ServletContext object?
Best answer
The ServletContext interface defines a servlet’s view of the Web application within which the servlet is running. Using the ServletContext object, a servlet can log events, obtain URL references to resources, and set and store attributes that other servlets in the context can access.
A ServletContext is rooted at a known path within a Web server. For example, a servlet context could be located at http://www.example.com/demos. All requests that begin with the /demos request path, known as the context path, are routed to the web application associated with the ServletContext.